Message Boards Message Boards

0
|
4730 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Matrix product with its Transpose

Posted 8 years ago

The product of a symmetric matrix with its transpose will give you the identity matrix. I can do this using a matrix operation in Mathematica but how can I show this using index notation summation?

AijAkj = ?ik

I'm familiar with the Sum function,

Sum[a[[i,j]]a[[k,j]],{i,3},{j,3},{k,3}]

but I can't figure out how to collect the proper terms into a table.

POSTED BY: Mark Brethen
4 Replies

Could be done as below.

a = Array[x, {3, 3}];
aatrans[i_, j_] := Sum[a[[i, k]] a[[j, k]], {k, 3}]


Table[aatrans[i, j], {i, 3}, {j, 3}] // Expand


(* Out[635]= {{x[1, 1]^2 + x[1, 2]^2 + x[1, 3]^2, 
 x[1, 1] x[2, 1] + x[1, 2] x[2, 2] + x[1, 3] x[2, 3], 
 x[1, 1] x[3, 1] + x[1, 2] x[3, 2] + 
  x[1, 3] x[3, 3]}, {x[1, 1] x[2, 1] + x[1, 2] x[2, 2] + 
  x[1, 3] x[2, 3], x[2, 1]^2 + x[2, 2]^2 + x[2, 3]^2, 
 x[2, 1] x[3, 1] + x[2, 2] x[3, 2] + 
  x[2, 3] x[3, 3]}, {x[1, 1] x[3, 1] + x[1, 2] x[3, 2] + 
  x[1, 3] x[3, 3], 
 x[2, 1] x[3, 1] + x[2, 2] x[3, 2] + x[2, 3] x[3, 3], 
 x[3, 1]^2 + x[3, 2]^2 + x[3, 3]^2}} *)

But a.Transpose[a] is the better way to do this in general.

POSTED BY: Daniel Lichtblau
Posted 8 years ago

You should also be able to show this using the index notation in my previous post, which is a summation. However, I can't figure out how to use the Sum function in Mathematica. I've tried using combinations Sum and Table/Collect, but do not get the expected result.

POSTED BY: Mark Brethen

Example with 2x2 orthogonal matrix

In[2]:= A = {{Cos[\[Theta]], -Sin[\[Theta]]}, {Sin[\[Theta]], 
    Cos[\[Theta]]}};

In[3]:= AT = Transpose[A];

In[4]:= Simplify[A.AT]

Out[4]= {{1, 0}, {0, 1}}

Now, in terms of summations

In[5]:= Simplify[Sum[A[[1, i]] AT[[i, 1]], {i, 1, 2}]]

Out[5]= 1

In[6]:= Simplify[Sum[A[[1, i]] AT[[i, 2]], {i, 1, 2}]]

Out[6]= 0

etc.

POSTED BY: S M Blinder

Correction: It is an orthogonal matrix for which the transpose equals the inverse, so that A.A^T = I. Also note that Mathematica gives matrix products when you input A.B

POSTED BY: S M Blinder
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract