# Tensor

This topic is 4150 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Greetings from Manchester. I'm not sure if it is the right place to ask this question, but is there anyone familiar with the tensor algebra? I'm just a bit confused with simple matrix/tensor multiplications. Could anyone tell me what is the general rule to multiply a tensor with a matrix? For example, if A is a 4x2x2 third-rank tensor and B is a 2x2 matrix, how can I compute A*B*transpose(A)? Is the result a matrix or a tensor? Thank you!

##### Share on other sites
The question as posted isn't a direct fit with gamedev's focus on game development. But, as there is a tremendous amount of math of all sorts involved in creating some modern games, I allow some flexiblity in this forum. As long as it is clear that a question isn't a direct request for help doing homework or schoolwork/tests, I usually allow threads to remain open for discussion. You can read up on specific forum policy over here: Forum FAQ

##### Share on other sites
There has been some work done in viscoelastic fluid simulation lately that involve tensors, so maybe gpgpu.org's forums might have someone who can help.

If that doesn't work, maybe try finding a General Relativity related forum. The tensors only go up to rank 2, but oh boy are there ever a gazillion of them. That might be the best place to start.

http://www.grc.nasa.gov/WWW/K-12/Numbers/Math/documents/Tensors_TM2002211716.pdf
http://www.nmt.edu/~iavramid/2001s/m332tensor.pdf

[Edited by - taby on June 12, 2007 12:47:35 PM]

##### Share on other sites
You need to provide more information about your tensors. The "products" you indicate involve repeated indices and using summation on those. For example, if your tensor A has elements a_{ijk}, where 1 <= i <= 4, 1 <= j <= 2, and 1 <= k <= 2, and if B has elements b_{mn}, where 1 <= m <= 2 and 1 <= n <= 2, what do you really mean by A*B*transpose(A). First, start off with defining transpose(A). For a 2-tensor, C with elements c_{ij}, where 1 <= i <= n and 1 <= j <= m, transpose(C) is c_{ji}. Which of the A indices do you intend to transpose?

If the last two indices are to be transposed, do you mean to compute a_{imn}*b_{mn}*a_{ikj}? The summation convention is that you sum over i, sum over m, and sum over n, so k and j are free indices, leading to a product that is a 2-tensor.

1. 1
Rutin
47
2. 2
3. 3
4. 4
5. 5

• 13
• 10
• 12
• 10
• 13
• ### Forum Statistics

• Total Topics
632994
• Total Posts
3009769
• ### Who's Online (See full list)

There are no registered users currently online

×