Message Boards Message Boards

1
|
7094 Views
|
2 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Matrix multiplications

Posted 11 years ago
HI everyone, 

This might be really trivial for most people but i cant seem to solve it. 
I have lets say two matrices 
Ix = (1/2)*{{0, 1}, {1, 0}} // MatrixForm
Iy = (1/2)*{{0, -i}, {i, 0}} // MatrixForm
so i do 
MatrixForm[Ix.Iy]
I do not actually get a product of Matrics but just a form which gives me Ix.Iy in matrix form? 

I can't seem to figure out what i am doing wrong. 

Thanks for the help? 
POSTED BY: Vipin Agarwal
2 Replies
Posted 11 years ago
Dear Arnoud 

Thanks for your kind reply. That clears up the idea. 
POSTED BY: Vipin Agarwal
The postfix operator (//) has a higher precedence than Set (=), so Ix and Iy are not just the matrix, but the matrix with the formatting function MatrixForm:
In[7]:= FullForm[Ix]
Out[7]//FullForm= MatrixForm[List[List[0,Rational[1,2]],List[Rational[1,2],0]]]

You can use parentheses in this case to avoid this problem:
(Ix = (1/2)*{{0, 1}, {1, 0}}) // MatrixForm
(Iy = (1/2)*{{0, -i}, {i, 0}}) // MatrixForm
MatrixForm[Ix.Iy]
POSTED BY: Arnoud Buzing
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