I have the solution to a problem here. $$ \begin{bmatrix} 5 & 2 & 7 \\ 1 & 1 & 3 \\ 9 & 0 & 2 \\ \end{bmatrix} \cdot \begin{bmatrix} 0 & 1 & 5 \\ 9 & 1 & 9 \\ 2 & 2 & 6 \\ \end{bmatrix} $$
That gives a result of
\begin{bmatrix} 27 & 3 & 74 \\ \end{bmatrix}
What exactly is happening here? Please help! Why isn't the solution a $3 \times 3$ matrix?
In Matlab, the dot function treats A and B as collections of column vectors.
The first column of A is $\vec{A_1}=(5,1,9)$, the first column of B is $\vec{B_1}=(0,9,2)$, hence the dot product $\vec{A_1}\cdot \vec{B_1}=27$ and so on, giving the total result $A\cdot B =(27, 3, 74)$ which is NOT the matrix product
You are probably looking for the operation A*B which gives the matrix product of A and B.