A matrix in \(\mathbb R^{m\times n}\) has \(m\) rows and \(n\) columns. Add matrices entry by entry only when their orders match.
The inner dimensions must agree. Each entry of \(AB\) is the dot product of a row of \(A\) and a column of \(B\). The outer dimensions give the order of the product.
Transpose interchanges rows and columns. For compatible matrices \((AB)^{\mathsf T}=B^{\mathsf T}A^{\mathsf T}\).