Skip to main content

Section 4.1 Matrices

Subsection 4.1.1 Definition of a Matrix

Definition 4.1.1.

A matrix is a rectangular array of scalars. If the matrix has \(m\) rows and \(n\) columns, it is called an \(m \times n\) matrix. The scalars in the matrix are called the entries, components or coefficients.

Definition 4.1.2.

The rows of a matrix are called the row vectors of the matrix. Likewise, the columns are called column vectors of the matrix.
The array of numbers is written in rows and columns, enclosed in either square or round brackets. Here are two ways of writing a particular \(3\times 2\) matrix with integer coefficients.
\begin{align*} \amp \begin{pmatrix} 5 \amp 6 \\ -4 \amp -4 \\ 0 \amp -3 \end{pmatrix} \amp \amp \begin{bmatrix} 5 \amp 6 \\ -4 \amp -4 \\ 0 \amp -3 \end{bmatrix} \end{align*}
The rows of this matrix are the following three vectors.
\begin{align*} \amp \begin{pmatrix} 5 \\ 6 \end{pmatrix} \amp \amp \begin{pmatrix} -4 \\-4 \end{pmatrix} \amp \amp \begin{pmatrix} 0 \\ -3 \end{pmatrix} \end{align*}
The columns of this matrix are the following two vectors.
\begin{align*} \amp \begin{pmatrix} 5 \\ -4 \\ 0 \end{pmatrix} \amp \amp \begin{pmatrix} 6 \\ -4 \\ -3 \end{pmatrix} \end{align*}
In these notes, I’ll use curved brackets for matrices; however, in many texts and books, square brackets are very common. Both notations are conventional and acceptable.
If I wanted to write a general matrix, I can use a double subscript.
\begin{equation*} \begin{pmatrix} a_{11} \amp a_{12} \amp \ldots \amp a_{1m} \\ a_{21} \amp a_{22} \amp \ldots \amp a_{2m} \\ \vdots \amp \vdots \amp \vdots \amp \vdots \\ a_{n1} \amp a_{n2} \amp \ldots \amp a_{nm} \end{pmatrix} \end{equation*}
By convention, in an arbitrary matrix entry \(a_{ij}\) the first subscript tells us the row and the second subscript tells us the column. For example, \(a_{64}\) is the entry in the sixth row and the fourth column. In the rare occurrence where matrices with more than 10 rows or columns are used, I can separate the indices by commas: \(a_{12,15}\) would be in the twelfth row and the fifteenth column. Sometimes I write \(A = a_{ij}\) as short-hand for the entire matrix when the size is understood or undetermined.

Definition 4.1.3.

A square matrix is a matrix with the same number of rows as columns. Here are two examples.
\begin{align*} \amp \begin{pmatrix} 4 \amp -2 \amp 8 \\ -3 \amp -3 \amp -3 \\ 0 \amp 0 \amp -1 \end{pmatrix} \amp \amp \begin{pmatrix} 0 \amp 0 \amp 0 \amp 1 \amp 0 \\ 1 \amp 0 \amp 0 \amp 1 \amp 0 \\ 1 \amp 0 \amp 1 \amp 1 \amp 0 \\ 0 \amp 1 \amp 0 \amp 0 \amp 0 \\ 0 \amp 1 \amp 1 \amp 1 \amp 0 \end{pmatrix} \end{align*}

Definition 4.1.4.

The zero matrix is the unique matrix (one for every size \(m \times n)\) where all the coefficients are all zero.
\begin{align*} \amp \begin{pmatrix} 0 \amp 0 \\ 0 \amp 0 \\ 0 \amp 0 \end{pmatrix} \amp \amp \begin{pmatrix} 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{align*}

Definition 4.1.5.

The diagonal entries of a matrix are all entries \(a_{ii}\) where the row and column indices are the same. A diagonal matrix is a matrix where all the non-diagonal entries are zero.
\begin{align*} \amp \begin{pmatrix} 5 \amp 0 \\ 0 \amp 2 \\ 0 \amp 0 \end{pmatrix} \amp \amp \begin{pmatrix} 1 \amp 0 \amp 0 \amp 0 \\ 0 \amp -4 \amp 0 \amp 0 \\ 0 \amp 0 \amp 8 \amp 0 \\ 0 \amp 0 \amp 0 \amp 0 \end{pmatrix} \end{align*}

Definition 4.1.6.

The identity matrix is the unique \(n \times n\) matrix (one for each \(n\)) where the diagonal entries are all \(1\text{,}\) and all other entries are \(0\text{.}\) There are several notations for the identity. When the size \(n\) is understood, it can be written as \(I\) or \(Id\text{.}\) When I want to clarify the size of the matrix, I will write \(I_n\) for the \(n \times n\) identity matrix.
\begin{align*} \amp \begin{pmatrix} 1 \amp 0 \\ 0 \amp 1 \end{pmatrix} \amp \amp \begin{pmatrix} 1 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \amp \amp \begin{pmatrix} 1 \amp 0 \amp 0 \amp 0 \\ 0 \amp 1 \amp 0 \amp 0 \\ 0 \amp 0 \amp 1 \amp 0 \\ 0 \amp 0 \amp 0 \amp 1 \end{pmatrix} \end{align*}
When I defined vectors, I also defined addition term-by-term. I can do the same for matrices.

Definition 4.1.7.

If \(A\) and \(B\) are both \(n \times m\) matrices, then the sum \(A + B\) is the \(n \times m\) matrix formed by simply adding the entries of the two matrices in their apporpriate position.
The definition of vector addition is extremely important to the geometry of vectors. It turns out that matrix addition is less central to the geometry presented in this course. This operation will show up in a couple of places, but it is much less important that the operation of matrix multiplication, which will be presented later in Section 6.2,
Sometimes it is useful add separation to the organization of the matrix.

Definition 4.1.8.

An extended matrix is a matrix with a vertical division separating the columns into two groups.
\begin{equation*} \left( \begin{array}{ccc|c} -3 \amp 0 \amp 6 \amp 1 \\ 4 \amp -2 \amp 2 \amp -1 \\ 0 \amp 0 \amp 3 \amp -7 \end{array} \right) \end{equation*}

Definition 4.1.9.

The transpose of a matrix is the matrix formed by switching the rows and columns. Alternatively, it is the mirror of the matrix over the diagonal. If \(A = a_{ij}\) is a matrix expressed in indices, then the transpose is written \(A^T\) and has entries \(a_{ji}\) with indices switched.
\begin{align*} A \amp = \begin{pmatrix} 3 \amp 0 \amp 6 \amp -1 \\ 4 \amp -2 \amp -7 \amp 0 \\ 6 \amp -6 \amp -1 \amp -2 \end{pmatrix} \amp A^T \amp = \begin{pmatrix} 3 \amp 4 \amp 6 \\ 0 \amp -2 \amp -6 \\ 6 \amp -7 \amp -1 \\ -1 \amp 0 \amp -2 \end{pmatrix} \\ A \amp = \begin{pmatrix} 0 \amp 0 \amp 8 \amp -5 \\ 0 \amp 1 \amp 1 \amp -2 \\ 0 \amp 6 \amp 6 \amp -1 \\ 0 \amp 0 \amp -4 \amp -4 \end{pmatrix} \amp A^T \amp = \begin{pmatrix} 0 \amp 0 \amp 0 \amp 0 \\ 0 \amp 1 \amp 6 \amp 0 \\ 8 \amp 1 \amp 6 \amp -4 \\ -5 \amp -2 \amp -1 \amp -4 \end{pmatrix} \end{align*}

Definition 4.1.10.

The set of all \(n \times m\) matrices with real coefficients is written \(M_{n,m}(\RR)\text{.}\) For square matrices (\(n \times n\)), I simply write \(M_n(\RR)\text{.}\) If I wanted to change the set of scalars to some other number set \(S\) (such as \(\ZZ\)), we would write \(M_{n,m}(S)\) or \(M_n(S)\text{.}\)