Matrix
BasisPrerequisites
Whenever you need to store, transform, or transmit structured data — a grayscale image, a system of prices, the forces acting on a structure — you are almost certainly using a matrix. Matrices are the computational workhorse of linear algebra: they make abstract ideas concrete and give you something you can actually calculate with.
What is a matrix?
An matrix over a field is a rectangular array with rows and columns whose entries come from . You write it as:
The entry in row and column is called , or equivalently . The pair is the shape (or dimensions) of the matrix. When the matrix is called a square matrix of order .
Two matrices are equal if and only if they have the same shape and every corresponding entry is equal.
Special cases: vectors as matrices
A column vector is an matrix — a single column of entries. A row vector is a matrix — a single row of entries. You have already seen column vectors as elements of in the prerequisite on vector spaces; a matrix is just a side-by-side arrangement of several such columns (or, if you prefer, a stacked arrangement of several rows).
Adding matrices and scaling them
Matrix addition is defined entry-wise. If and are both matrices then their sum is the matrix with
You simply add corresponding entries. If and have different shapes, their sum is not defined.
Scalar multiplication by scales every entry:
These two operations are exactly the pointwise operations you would perform on the individual entries, extended to the whole array simultaneously.
The vector space of matrices
Because addition and scalar multiplication act entry-by-entry, the set of all matrices over — written — inherits the full structure of a vector space. The zero matrix (all entries equal to zero) plays the role of the zero vector, and every axiom (associativity, distributivity, etc.) follows immediately from the corresponding axiom in .
This means you can do everything to matrices that you can do to vectors: take linear combinations, talk about linear independence, span, and bases. In fact, the matrices that have a in position and zeros everywhere else form a basis of , so .
The transpose
The transpose of a matrix is the matrix whose entry is
In plain language: you flip the matrix across its main diagonal, turning rows into columns and columns into rows. For example:
Transposition satisfies and . A square matrix with is called symmetric.
The identity matrix
The identity matrix is the square matrix with s on the main diagonal and s everywhere else:
Its entry at position is the Kronecker delta , which equals if and otherwise. When you multiply any conformable matrix by , the matrix is unchanged — the identity matrix acts as the multiplicative identity for matrix multiplication, which is developed in Linear Map.
Matrices as encodings of linear maps
A matrix is not just a storage format. As you will see in Linear Map, every matrix encodes a specific linear function from to , and every linear function between finite-dimensional spaces can be written as a matrix once you fix bases. This connection is the reason matrices are so central to linear algebra.
Summary
- An matrix over is a rectangular array of entries .
- Column vectors and row vectors are the special cases and .
- Matrix addition and scalar multiplication work entry-wise; together they make a vector space of dimension .
- The transpose swaps rows and columns: .
- The identity matrix has s on the diagonal and acts as a multiplicative identity.
- Matrices encode linear maps — the connection is made precise in Linear Map.