This matrix can be subdivided into its columns. For this, the idea of seeing a matrix
as a vector of vectors is very useful. I introduced this idea in the
introductory lesson about matrices.
Let us divide A into columns:
A=[a1a2a3].
Here, a1 is the first column of A, a2 is the second,
and a3 is the third and final column. Therefore, we can say that
We now have another vector x whose number of components is the same as the number
of columns in our matrix (in our example, 3):
x=x1x2x3.
We can now perform a multiplication between the matrix A and the vector x.
The product is the linear combination of the columns of A, where the coefficients come
from the corresponding element of x. In other words
As you can see, the product of a matrix and a vector is another vector.
I chose the letters A, x, and b very deliberately, since
these letters are conventionally used in this context (this operation will be very
important for future lessons).
Dimensions of the Operands and the Result
As you can infer from the example above, the matrix used was a 4×3 matrix.
The vector we used in the multiplication had 3 components.
This is very important: the product of a matrix and a vector is only defined for matrix-vector pairs where the number of components in the vector is the same as the number of columns in the matrix. This, for instance, means that you cannot multiply a vector with 5 components with a
matrix of size 5×3, because that matrix would only have 3 columns.
More formally, if A is an m×n matrix, for the operation Ax to be defined,
x must have n components.
The resulting vector b has the same number of components as the number of rows in
the matrix involved in the operation. For an m×n matrix, the resulting vector
b will have m components.
Example
Allow me to demonstrate through the following numerical example.
Take the matrix