How can I get one single product matrix? Please help!
1 Answer
$\begingroup$ $\endgroup$
1 MatrixForm wraps the matrix for display, preventing other operations from seeing it as a matrix. This is actually quite handy: you can display matrix calculations unevaluated. To allow them to proceed, just remove the wrapper:
c1.d1 /. MatrixForm -> Identity (* {{17, 36, 63}, {29, 4, 68}, {36, 32, 103}} *) Re-wrap the result in MatrixForm if you want it pretty.
- $\begingroup$ Got it! Thank you John! $\endgroup$Aly S.– Aly S.2018-02-26 22:40:10 +00:00Commented Feb 26, 2018 at 22:40


MatrixFormis only for visualizing the results. Sayingc1 = List[{2, 9}, {7, 1}, {7, 8}]is very different than sayingc1 = List[{2, 9}, {7, 1}, {7, 8}] // MatrixForm. To fix the issue, don't useMatrixFormwhen making assignments, only use it for displaying results. $\endgroup$c1 = List[{2, 9}, {7, 1}, {7, 8}]; d1 = List[{4, 0, 9}, {1, 4, 5}]; result = d1.c1; (* now use MatrixForm to print the result *) MatrixForm @ result$\endgroup$