We introduced matrices when discussing systems of linear equations. Recall that an \(m \times n\) matrix is a rectangular array of numbers, written in the form
In the context of systems of linear equations the main concept was row reducing a matrix to produce equivalent matrices. In different contexts, however, other operations on matrices have proved useful and we shall discuss these operations below. Before doing this, though, we will introduce some new terminology.
For the matrix \(A=(a_{ij})_{m \times n}\text{,}\) its transpose, denoted by \(A^T\text{,}\) is defined by \(A^T = \left(a_{ji}\right)_{n \times m}\text{.}\)
The \(n \times n\) identity matrix, \(I_n\), is the matrix with \(n\) rows and \(n\) columns with all entries on the main diagonal equal to \(1\) and all other entries \(0\text{,}\) i.e.
Often, when the size of the identity matrix is clear the subscript is dropped from the notation and the identity matrix is denoted just by \(I\text{.}\)
Thus, to add two matrices of the same size, add up the corresponding entries in each matrix. Matrix addition of matrices not of the same size is not defined. To multiply a matrix by a scalar, multiply each entry in the matrix by that scalar. Note that we now can also subtract two matrices by defining
If \(A = \begin{pmatrix} 1 \amp 2 \amp 3\\ 4 \amp 3 \amp 2\end{pmatrix}, \quad B = \begin{pmatrix} 5 \amp 3 \\ 9 \amp 2 \\ 4 \amp 3\end{pmatrix}.\) Then calculate the given expression or explain why it does not exist.
Show that for any matrix \(A\,\text{,}\)\(3A = A + A + A\text{.}\) For what values of \(k\) is it true that \(kA = \underbrace{A + A + \cdots + A}_{k \mbox{ times}}\,\text{?}\)
If we call \(C=AB\) then from this definition it can be seen:
For the matrix multiplication \(AB\) to be defined the number of columns in \(A\) has to be equal to the number of rows in \(B\text{.}\) The resulting matrix, \(C\text{,}\) has the same number of rows as \(A\) and the same number of columns as \(B\text{.}\)
Entry \(c_{ij}\) in \(C\) is found by taking the scalar (or dot) product of the \(i^{\mbox{th}}\) row vector from \(A\) with (the transpose of) the \(j^{\mbox{th}}\) column vector from \(B\text{,}\) i.e.
Since \(A\) is a \(3 \times 2\) matrix and \(B\) is \(2\times 2\) then \(AB\) is defined since \(A\) has \(2\) columns and \(B\) has \(2\) rows. The resultant matrix will be a \(3 \times 2\) matrix since \(A\) has \(3\) rows and \(B\) has \(2\) columns. Thus \(AB\) will be of the form
For later reference, some properties of the transpose of a matrix with respect to the various matrix operations that we have been discussing are listed below.
We can now use the properties of matrix multiplication to establish some interesting facts about the solutions to systems of linear equations. For example:
Let \(\mathbf{x} = \mathbf{u}\) and \(\mathbf{x} = \mathbf{v}\) be two distinct solutions to (17.1) and let \(\mathbf{w} = \mathbf{u} - \mathbf{v}\text{.}\) By using the properties of matrix multiplication we can see that
and so \(\mathbf{x} = \mathbf{u} + \mathbf{v}\) is another solution to (17.1), which is not possible. Thus there cannot be any non-zero solutions to (17.2).
Since (17.1) has an infinite number of solutions let \(\mathbf{x} = \mathbf{u}\) and \(\mathbf{x} = \mathbf{v}\) be two distinct solutions to (17.1). Now let \(\mathbf{w} = \mathbf{u} - \mathbf{v}\) and \(t \in \mathbb{R}\text{.}\) Then
Note that these arguments are general and hold for any system of \(m\) linear equations in \(n\) variables. Note also that if the system consists of \(3\) linear equations in \(3\) variables then result (17.2) above can be stated as:
There are many applications of matrices where we view the matrix as a transformation (or mapping) that takes one vector and transforms (or maps) it to another vector. So, if \(A\) is an \(m \times n\) matrix then \(A\) can be thought of as a transformation that takes the \(n \times 1\) vector \(x\) to the \(m \times 1\) vector \(\mathbf{b} = A\mathbf{x}\text{.}\)
Since \(A\) is a \(2 \times 2\) matrix, we can think of \(A\) as a transformation that takes each vector \(x\) in the plane to another vector in the plane, \(b = A\mathbf{x}\text{.}\) Under this transformation, for example, \(\mathbf{x} = \begin{pmatrix} 2 \\ 1 \end{pmatrix}\) goes to
In fact, \(A\) is the matrix for the transformation that we would describe as a reflection in the line \(y = x\text{.}\) To see this, let the vector \((x,y)\) be transformed to the vector \((b_1,b_2)\) under this reflection. Then we know that
\begin{align*}
b_1 \amp = y = 0x +y \\
b_2 \amp = x = 1x + 0y
\end{align*}
Determine the matrix for the transformation in which a reflection in the line \(y = x\) is followed by a rotation about the origin through \(\pi^c\text{.}\)
Let \(A_1 = \begin{pmatrix} 0 \amp 1 \\ 1 \amp 0\end{pmatrix}\) and \(A_2 = \begin{pmatrix} -1 \amp 0 \\ 0 \amp -1 \end{pmatrix}.\) Then, under the given transformation the vector \(\mathbf{x}\) will be mapped to the vector \(\mathbf{b}\) where
Transformations that can be represented via a matrix are called linear transformations. When the matrix is a \(2 \times 2\) matrix the transformation is called a linear transformation of the plane.
Linear transformations in 3 dimensions are also possible. The Sage cell below plots the effect of a linear transformation on three unit vectors and the parallelepiped spanned by them.
Find the matrix for the transformation of the plane in which a rotation about the origin through \(180^{\circ}\) is followed by a reflection in the line \(y = 2x\text{.}\)
Find the vector to which \(\mathbf{x} = \begin{pmatrix}1 \\ 2\end{pmatrix}\) is mapped by \(\begin{pmatrix} 3 \amp 4 \\ 1 \amp 2 \end{pmatrix}\) followed by \(\begin{pmatrix}2 \amp 1 \\ 3 \amp 3 \end{pmatrix}\) followed by \(\begin{pmatrix}-1 \amp 1 \\ -1 \amp 0\end{pmatrix}.\)