Rules of matrices I don't understand this multiply matrices thing, what is required for me to be able to do this?
for the multiplication to be "legal"?
Yeah I guess? Particularly for uneven matrices like say A = 5x4 and B = 4x3 That sort of thing.
stolen from wikipedia but the product AB is defined only if the number of columns in A is equal to the number of rows in B
for example if A was 3x2 and B was 2x3 it'd be defined if A was 3x3 and B was 2x2 it wouldn't be defined
So 5x4 and 4x3 wouldn't work?
look at the inner most numbers the way matrices are expressed it's rowx col
so \(axb * cxd\) is defined when b=c
this is part of why matrix multiplication also isn't commutative for example, 2x2 * 1x2 isn't defined but 2x1 * 2x2 is defined
and the outer numbers tells you the size of the product matrix. So a 2x1 * 2x2 multiplication will result in a 2x2 matrix and 5x4 * 4x3 gives a 5x3 matrix
The number of columns of the left matrix must equal the rows of the right matrix.
Matrices come from systems of equations. For example: \[ ax+by = e\\ cx+dy=f \]We can write this a vector equation: \[ \begin{bmatrix}a\\c\end{bmatrix}x+\begin{bmatrix}b\\d\end{bmatrix}y=\begin{bmatrix}e\\f\end{bmatrix} \]However, if we want to treat the variables \(x\) and \(y\) as components of a vector, then we need matrix multiplication to be defined to work this way:\[ \begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}ax+by\\cx+dy\end{bmatrix} \]This way we can say: \[ \begin{bmatrix}a&b\\c&d\end{bmatrix}\begin{bmatrix}x\\y\end{bmatrix} = \begin{bmatrix}e\\f \end{bmatrix} \]
Okay... but 5x4 and 4x3 will work.
Matrices are denoted with rows by columns. If the left matrix has 4 columns, and the right matrix has 4 rows, then it should work.
And we have 4 columns and 4 rows.
Which means this is possible, right?
Join our real-time social learning platform and learn together with your friends!