Message Boards Message Boards


Matrix multiplications

Posted 10 years ago
2 Replies
2 Total Likes
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 
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 10 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
POSTED BY: Arnoud Buzing
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract