On the side we have a sample matrix multiplication. Here is a matrix, and B is a matrix (rows columns). Matrices only multiply when the rows of the first match up with the columns of the second. The number of rows is given by the number of rows in the left matrix, and the number of columns is given by the number of columns in the right matrix. Succinctly, we have that
Here, we have a matrix times a matrix, which gives us a matrix. Note that isn't even a valid multiplication, because has 3 values per row but has 2 values per column. Matrix multiplication is not commutative! (It is associative: .)
If this is new to you, take a second to look at what's being multiplied by what. To get the cell at row and column of the output, we take row from and column from , multiply them together pairwise, and then sum them up.
If we think of matrices as transformations, like the Fibonacci stepping, then the shape of the matrix tells us how many values it takes in and how many it spits out. is a matrix, so it can be multiplied by a list of numbers to get a of outputs: it takes three inputs and gives you two back. The recurrence is represented by , a matrix. The full version that gives you and is just this row stacked on top of another row describing how we get .
On the side we have a sample matrix multiplication. Here is a matrix, and B is a matrix (rows columns). Matrices only multiply when the rows of the first match up with the columns of the second. The number of rows is given by the number of rows in the left matrix, and the number of columns is given by the number of columns in the right matrix. Succinctly, we have that
Here, we have a matrix times a matrix, which gives us a matrix. Note that isn't even a valid multiplication, because has 3 values per row but has 2 values per column. Matrix multiplication is not commutative! (It is associative: .)
If this is new to you, take a second to look at what's being multiplied by what. To get the cell at row and column of the output, we take row from and column from , multiply them together pairwise, and then sum them up.
If we think of matrices as transformations, like the Fibonacci stepping, then the shape of the matrix tells us how many values it takes in and how many it spits out. is a matrix, so it can be multiplied by a list of numbers to get a of outputs: it takes three inputs and gives you two back. The recurrence is represented by , a matrix. The full version that gives you and is just this row stacked on top of another row describing how we get .