INAIO Guide Stage 1 11Matrices and Linear Transformations
11.3 Matrix–vector multiplication
Multiply each matrix row by a vector to compute outputs, then interpret the same result as a combination of columns.
In Module 11.2, a matrix product connected two grids. What if we have just one set of input values? The vector from Module 10.3 is a one-column grid, so the same multiplication rule turns it into one set of outputs. Each row states how to combine the inputs for one output, whether that output is a score or a new coordinate.
This is intermediate linear algebra. Learn matrix products in OpenStax, then treat the vector as a one-column matrix.
A basic idea: one row, one output
If has shape and is an vector, then is an vector. Row of produces output .
For example,
A quick tour of properties
The same result is a combination of columns: if , then . Here each input scales one whole column, and the scaled columns add to the output. This is the same arithmetic seen from the input side rather than one output row at a time. Dimensions tell you whether the product is defined: a vector with the wrong number of entries cannot be multiplied by . Matrix–vector multiplication is linear: and . Combining inputs before applying gives the same result as combining their outputs afterward.
Application 1: weighted scores
Two candidates have feature vectors and . Score one uses weights and score two uses . Stacking the weights as rows gives
Then and . Candidate leads on the first score; leads on the second. Each row states how that score weights the features.
Application 2: a coordinate transformation
Let . For ,
The matrix swaps the coordinates: it reflects every point in the line . This is a geometric transformation rather than a score, but it uses the same row-by-vector arithmetic.
Resources
| Source | Title | Why read it |
|---|---|---|
| OpenStax | Matrices and matrix operations | Use matrix products with a one-column matrix. |
Finished this module? Mark it done.
Comments
Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.
Loading comments