9. Identity and inverse¶
You solve \(ax=b\) for nonzero \(a\) without thinking about it: \(x=b/a\). If we do break it down a little, we can see that when we multiply both sides of \(ax=b\) by the number \(1/a\), then on the left the terms \(1/a\) and \(a\) combine to give \(1\), and \(1x=x\). That is, the key to the solution is the presence of a multiplicative identity value \(1\), and the existence of the multiplicative inverse \(1/a\) when \(a\neq 0\). These two items are the key to unlocking the vector case \(\bfA\bfx=\bfb\), too.
9.1. Matrix identity¶
Suppose we are given an \(m\times n\) matrix \(\bfA\). Writing its columns as the vectors \(\bfa_1,\ldots,\bfa_n\), we can make the rather obvious observations
The purpose in using these expressions is to interpret them as linear combinations, and thus as matrix-vector products. Let’s define \(\bfe_j\) for \(j=1,\ldots,n\) as follows.
Now we can write
Furthermore, the definition of matrix-matrix product as a concatenation of matrix-vector products implies that
This motivates another important definition.
The \(n\times n\) identity matrix is
Sometimes, when we need to indicate the size of the identity, we use a subscript, as in \(\meye_4\) to represent the \(4\times 4\) case. Usually, though, it’s implied by the context.
Note
MATLAB has the command eye
to create an identity matrix, and you always must provide the size, as in eye(4)
.
We’ll state the identity’s key property now.
If \(\bfA\) is \(m\times n\), then \(\bfA = \meye_m \bfA = \bfA \meye_n\).
Example
Compute
Solution
You can grind through the definition, of course, but there is a shortcut:
9.2. Inverse¶
We are now going to introduce a major simplification by narrowing to the case we are most interested in.
Important
From now on, all matrices are assumed to be square, meaning they have the same number of rows as columns.
Here is what we seek from a multiplicative inverse.
Suppose \(\bfA\) is \(n\times n\). An \(n\times n\) matrix \(\mathbf{Z}\) such that \(\mathbf{Z}\bfA = \meye\) and \(\bfA\mathbf{Z}=\meye\) is called the inverse of \(\bfA\), written \(\mathbf{Z} = \bfA^{-1}\).
There are some facts about inverses that we will take for granted without justification.
If an inverse matrix exists for \(\bfA\), it is unique.
If either \(\mathbf{Z}\bfA = \meye\) or \(\bfA\mathbf{Z}=\meye\) is true, then both are true and \(\mathbf{Z}=\bfA^{-1}\).
Example
The matrix \(\mathbf{R}(\theta) = \begin{bmatrix} \cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\) performs rotation in the plane around the origin by angle \(\theta\). Show that \(\mathbf{R}(-\theta)\) is the inverse of \(\mathbf{R}(\theta)\).
Solution
All we need to do is to check that the product (in either order) is the identity matrix:
Having laid all the groundwork, a general statement about solving linear systems is now possible.
If \(\bfA\) is \(n\times n\) and has an inverse, then the linear system \(\bfA\bfx=\bfb\) has the unique solution \(\bfx=\bfA^{-1}\bfb\).
Let \(\bfx\) be any vector that solves \(\bfb=\bfA\bfx\). Multiply both sides on the left by \(\bfA^{-1}\). Then
Since the inverse is unique, \(\bfx\) is unique as well.
9.3. Singular matrices¶
The solution formula \(\bfx=\bfA^{-1}\bfb\) is important but incomplete. One unresolved issue is how to compute the inverse of a given matrix. In the \(2\times 2\) case it’s so easy that it’s worth committing to memory.
This formula breaks down if \(ad=bc\), in which case the matrix is singular.
Beyond \(2\times 2\) we won’t worry about computing inverses; row elimination is a better computational method for solving linear systems. More fundamentally, though, we have not even established which matrices might be expected to have an inverse in the first place.
A matrix of all zeros can’t have an inverse, because \(\bfzero\bfA\) is zero for all matrices \(\bfA\). That conclusion extends what we know about a scalar \(a\). Unlike the scalar case, though, there are other matrices that have no inverse.
Example
Show that
has no inverse.
Solution
Suppose that \(\mathbf{Z}\) is the inverse of \(\bfA\), Then it would have to follow that
Matching the first columns of both sides then implies
which is impossible. We conclude that \(\mathbf{Z}\) cannot exist.
A square matrix that does not have an inverse is called singular. A matrix that does have an inverse is called invertible, or nonsingular.
Note
The statement “\(\bfA\) is singular” for the linear system \(\bfA\bfx = \bfb\) is the multidimensional equivalent of “\(a\) is zero” in the scalar problem \(ax=b\). For a singular matrix, a unique solution is impossible–the system has either no solution or infinitely many of them.
The next two questions for us are: How do we know when a given matrix is singular? And what happens in a linear system with a singular matrix?