Group Abstract Group Abstract

Message Boards Message Boards

0
|
6.6K Views
|
4 Replies
|
1 Total Like
View groups...
Share
Share this post:

Matrix product with its Transpose

Posted 10 years ago
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 10 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
POSTED BY: S M Blinder
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