In linear algebra, a matrix is written as a grid of numbers with brackets on either side. Typically, a matrix appears in an expression like this:
This describes the “2 by 2” matrix whose first column is and second column in .
To pass a vector as input to a matrix, we write the vector on the right-side of the matrix like this:
In plain language, this means given the as input, the matrix produces the vector as output.
Sometimes, we write the matrix elements using indices that describe the column and row of the element. For example, given the 3x3 matrix below, the element refers to the element in the second row and third column of the matrix.
We describe the dimensions of the matrix as the number of columns by the number of rows in the matrix. For example, the matrix below is a “2 by 3” matrix because it has two rows and three columns.
This is because a matrix is a linear function that maps the input space to output space.
The number of columns corresponds to the dimension of the input and the number of rows corresponds to the dimension of the output.
Another way to see the relationship between the input and output of a matrix is the corresponding system of linear equations. When we write the following:
This can be expanding into a linear system of equation like this: