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?
arnoudb
(Arnoud Buzing)
August 15, 2013, 4:41pm
2
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]
Dear Arnoud
Thanks for your kind reply. That clears up the idea.