Anonymous user
Matrix multiplication: Difference between revisions
→{{header|Mathematica}}
Line 2,060:
<lang mathematica>Dot[{{a, b}, {c, d}}, {{w, x}, {y, z}}]</lang>
With the following output:
<lang mathematica>{{a w + b y, a x + b z}, {c w + d y, c x + d z}}</lang>
This also computes a dot product, using the infix . notation:
Line 2,068 ⟶ 2,072:
<lang mathematica>Times[{{a, b}, {c, d}}, {{w, x}, {y, z}}]</lang>
With the following output:
<lang mathematica>{{a w, b x}, {c y, d z}}</lang>
With the following infix notations '*' and ' ' (space):
|