Skip to main content

Section 2.1 Matrices I

Before discussing the abstract viewpoint of real and complex vector spaces, we will become acquainted with the central computational tool of the subject - matrices. Our number system will be labelled \(K\text{,}\) but for us \(K\) will either be \(\mathbb{R}\) or \(\mathbb{C}\text{.}\)

Definition 2.1.1.

For positive integers \(m, n\text{,}\) an \(\mathbf{m \times n}\) matrix is a rectangular array
\begin{equation} A = \left[ \begin{matrix} a_{11} \amp a_{12} \amp \cdots \amp a_{1n} \\ a_{21} \amp a_{22} \amp \cdots \amp a_{2n} \\ \vdots \amp \ddots \amp \amp \vdots \\ a_{m1} \amp a_{m2} \amp \cdots \amp a_{mn} \end{matrix} \right] \tag{2.1.1} \end{equation}
For a given matrix \(A\text{,}\) call \(a_{ij}\) the \((i,j)\)-th entry of the matrix and write \(A = (a_{ij})\) as shorthand to denote \(A\text{.}\) The size of \(A\) is \(m \times n\) where \(m\) is the number of rows and \(n\) the number of columns.
The quanitites \(a_{ij}\) can be numbers or functions; anything where all of our rules of arithmetic from Section 1.1 hold. For then we can add two matrices of the same size by adding each entry of one to the corresponding entry of the other. With formulas, if
\begin{equation*} A = \left[ \begin{matrix} a_{11} \amp a_{12} \amp \cdots \amp a_{1n} \\ a_{21} \amp a_{22} \amp \cdots \amp a_{2n} \\ \vdots \amp \ddots \amp \amp \vdots \\ a_{m1} \amp a_{m2} \amp \cdots \amp a_{mn} \end{matrix} \right] \end{equation*}
and
\begin{equation*} B = \left[ \begin{matrix} b_{11} \amp b_{12} \amp \cdots \amp b_{1n} \\ b_{21} \amp b_{22} \amp \cdots \amp b_{2n} \\ \vdots \amp \ddots \amp \amp \vdots \\ b_{m1} \amp b_{m2} \amp \cdots \amp b_{mn} \end{matrix} \right] \end{equation*}
then
\begin{equation*} A + B = \left[ \begin{matrix} a_{11} + b_{11} \amp a_{12} + b_{12}\amp \cdots \amp a_{1n} + b_{1n}\\ a_{21}+ b_{21} \amp a_{22}+ b_{22} \amp \cdots \amp a_{2n} + b_{2n}\\ \vdots \amp \ddots \amp \amp \vdots \\ a_{m1}+ b_{m1} \amp a_{m2}+ b_{m2} \amp \cdots \amp a_{mn}+ b_{mn} \end{matrix} \right] \end{equation*}
Given a number \(\lambda\) in \(K\text{,}\) we can also multiply the entire matrix \(A\) by \(\lambda\) by just multiplying each entry by \(\lambda\) as in
\begin{equation*} \lambda A = \left[ \begin{matrix} \lambda a_{11} \amp\lambda a_{12} \amp \cdots \amp\lambda a_{1n} \\ \lambda a_{21} \amp \lambda a_{22} \amp \cdots \amp \lambda a_{2n} \\ \vdots \amp \ddots \amp \amp \vdots \\ \lambda a_{m1} \amp \lambda a_{m2} \amp \cdots \amp \lambda a_{mn} \end{matrix} \right] \end{equation*}
This operation is called scalar multiplication of a matrix and generally plays a different role than matrix multiplication which we now define.

Definition 2.1.2.

Let \(A = (a_{ij})\) be an \(m \times n\) matrix and \(B = (b_{jk})\) an \(n \times p\) matrix. The matrix product \(AB = C\) is an \(m \times p\) matrix with \((i,k)\)-th entry
\begin{equation*} c_{ik} = a_{i1}b_{1k} + a_{i2}b_{2k} + \cdots + a_{in} b_{nk}. \end{equation*}
Note that the matrix product \(AB\) is only defined when the number of columns of \(A\) equals the number of rows of \(B\text{.}\)

Example 2.1.3. Multiplying a row matrix by a column matrix.

Each entry of a matrix product is obtained by multiplying a row from the first matrix with a column from the second. For example, the product of the \(1 \times 3\) and \(3 \times 1\) matrix is just a number
\begin{equation*} \left[ \begin{matrix} -4 \amp 3 \amp 2 \end{matrix} \right] \left[ \begin{matrix}2 \\ 1 \\ -1 \end{matrix} \right] = (-4)\cdot 2 + 3 \cdot 1 + 2 \cdot (-1) = -7. \end{equation*}
When writing \(1 \times 1\) matrices, we usually drop the left and right brackets.

Example 2.1.4. Arithmetic of square matrices.

Square matrices are matrices of size \(n \times n\text{.}\) For a fixed \(n\text{,}\) it is convenient to compute with such matrices because they can be added and multiplied without worrying about their size. For example,
\begin{align*} \left[ \begin{matrix} 1 \amp 4 \\ -1 \amp 1\end{matrix} \right] \left( \left[ \begin{matrix} 0 \amp 1 \\ 1 \amp 0\end{matrix} \right] + \left[ \begin{matrix} -1 \amp 1 \\ 3 \amp -2\end{matrix} \right] \right) \amp = \left[ \begin{matrix} 1 \amp 4 \\ -1 \amp 1\end{matrix} \right] \left[ \begin{matrix} -1 \amp 2 \\ 4 \amp -2\end{matrix} \right], \\ \amp = \left[ \begin{matrix} 15 \amp -6 \\ 5 \amp -4\end{matrix} \right]. \end{align*}

Example 2.1.5. Identity matrices.

Theidentity matrix of size \(n\) is a square matrix given by
\begin{equation*} I_n = \left[ \begin{matrix} 1 \amp 0 \amp \cdots \amp 0 \\ 0 \amp 1 \amp \ddots \amp \vdots \\ \vdots \amp \ddots \amp\ddots \amp 0 \\ 0 \amp \cdots \amp 0 \amp 1 \end{matrix} \right]. \end{equation*}
When \(n\) is clear from the context, we may write \(I\) instead of \(I_n\text{.}\) It is not hard to see that \(I\) acts as a multiplicative identity for matrix multiplication. More precisely, for \(A\) and \(B\) as above,
\begin{align*} A I_n \amp = A \amp I_n B \amp = B. \end{align*}
At this point, let me encourage the student to use Sage to make matrix computations. The syntax for this can be picked up as you go, but we mention a few points. First, a matrix for Sage is a list of lists. Each member list is thought of as a row in the matrix, starting at the top and working down. Try changing a few of the numbers around, the size of the matrix to make sure you are comfortable defining matrices in Sage.
Now, it is very good to know how to compute by hand, but once you feel comfortable with this, you ought to relax a bit and use your tools. Let’s try Example 2.1.4 with Sage. To do this, we will define each matrix separately and the write the expression we are trying to compute.
Several of the arithmetic properties we reviewed in Section 1.1 still hold with addition and multiplication replaced with their matrix counterparts.
These properties can be shown to hold by a straightforward check, with perhaps the only intricate one being the associativity of the matrix product. However, this check is too messy for these notes and completely unenlightening, so we will leave it to the masochistic student’s discretion. What is most interesting and important are the properties that are not listed above, namely the ones that fail.

Example 2.1.7. Non-commuting matrices.

Note that matrix multiplication is not commutative. While occasionally two matrices will commute, even very simple looking matrices don’t. For example
\begin{equation*} \left[ \begin{matrix} 0 \amp 1 \\ 0 \amp 0\end{matrix} \right] \left[ \begin{matrix} 0 \amp 0 \\ 1 \amp 0\end{matrix} \right] = \left[ \begin{matrix} 1 \amp 0 \\ 0 \amp 0\end{matrix} \right], \end{equation*}
but
\begin{equation*} \left[ \begin{matrix} 0 \amp 0 \\ 1 \amp 0\end{matrix} \right] \left[ \begin{matrix} 0 \amp 1 \\ 0 \amp 0\end{matrix} \right] = \left[ \begin{matrix} 0 \amp 0 \\ 0 \amp 1\end{matrix} \right]. \end{equation*}

Example 2.1.8. Non-invertible matrices.

A general non-zero matrix does not have a multiplicative inverse. There are occasions where we can rule out an inverse on the basis of the size of a matrix. For example, we will show that only square matrices have the hope of being invertible (i.e. having a multiplicative inverse). But even for a square matrix, this hope may be in vain. We can show this without any propositions or theorems by observing
\begin{equation*} \left[ \begin{matrix} 1 \amp 1 \\ -1 \amp 1\end{matrix} \right] \left[ \begin{matrix} 1 \amp 1 \\ 1 \amp 1\end{matrix} \right] = \left[ \begin{matrix} 0 \amp 0 \\ 0 \amp 0\end{matrix} \right]. \end{equation*}
On the left we have a product of two non-zero matrices and on the right we have the zero matrix. This is a pretty bizarre phenomenon if you have only ever worked with numbers because no two non-zero numbers have product zero! Now, if the first matrix had a multiplicative inverse \(A\text{,}\) then
\begin{align*} \left[ \begin{matrix} 1 \amp 1 \\ 1 \amp 1\end{matrix} \right] \amp = I_2 \left[ \begin{matrix} 1 \amp 1 \\ 1 \amp 1\end{matrix} \right] \\ \amp = \left( A \left[ \begin{matrix} 1 \amp -1 \\ -1 \amp 1\end{matrix} \right] \right) \left[ \begin{matrix} 1 \amp 1 \\ 1 \amp 1\end{matrix} \right] \\ \amp = A \left(\left[ \begin{matrix} 1 \amp -1 \\ -1 \amp 1\end{matrix} \right] \left[ \begin{matrix} 1 \amp 1 \\ 1 \amp 1\end{matrix} \right] \right) \\ \amp = A \left[ \begin{matrix} 0 \amp 0 \\ 0 \amp 0\end{matrix} \right] \\ \amp = \left[ \begin{matrix} 0 \amp 0 \\ 0 \amp 0\end{matrix} \right] \end{align*}
But of course, this is ridiculous, so indeed the first matrix has no inverse.
As we will see, matrices with multiplicative inverses play a central role in linear algebra. The computational criterion for the existence of an inverse and the algorithm or formula of the inverse are key results and techniques that every student should master.

Exercises Exercises

1.

Give an example of a matrix \(B\) that has a left inverse, but not a right inverse. In otherwords, there exists a matrix \(A\) for which \(AB = I\) but there is no matrix \(C\) for which \(BC = I\text{.}\)
Hint.
The size of the identity matrices I in the first and second equation may be different.

2.

Calculate the following matrices:
(a)
\begin{equation*} \left[ \begin{matrix} 2 \amp 1 \\ - 2 \amp 0 \\ 1 \amp -1 \end{matrix} \right] \left[ \begin{matrix} 2 \amp 1 \amp 0 \\ 0 \amp 1 \amp 3 \end{matrix} \right] \end{equation*}
(b)
\begin{equation*} \left[ \begin{matrix} 1 - i \amp 1 \\ 0 \amp i - 1 \end{matrix} \right] \left( \left[ \begin{matrix} i \amp 0 \\ 0 \amp 1 \end{matrix} \right] + \left[ \begin{matrix} 1 \amp 0 \\ 0 \amp i \end{matrix} \right] \right) \end{equation*}

3.

Matrices do not need to have entries which are numbers. They can be functions as well. Calculate the following product as a \(2 \times 1\) matrix of polynomials.
\begin{equation*} \left[ \begin{matrix} t + 2 \amp t - 1 \amp t \\ 1 \amp t \amp 0 \end{matrix} \right] \left[ \begin{matrix} t \\ 1 \\ t - 1 \end{matrix} \right] \end{equation*}

4.

Explain why a \(1 \times 3\) matrix cannot be invertible.
Hint.
Show that for any such matrix \(A\text{,}\) there is \(3 \times 1\) matrix \(B\) which satisfies \(AB = 0\text{.}\) Then adapt the argument given in Example 2.1.8.