Difference between revisions of "The Inverse of a Linear Transformation"

From Department of Mathematics at UTSA
Jump to navigation Jump to search
(Created page with "A '''linear transformation''' is an important concept in mathematics because many real world phenomena can be approximated by linear models. Unlike a linear function, a line...")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
A '''linear transformation''' is an important concept in mathematics because many real world phenomena can be approximated by linear models.  
+
==Inverse of an n-by-n matrix==
 +
An n-by-n matrix A is the inverse of n-by-n matrix B (and B the inverse of A) if BA = AB = I,
 +
where I is an identity matrix.
  
Unlike a linear function, a linear transformation works on vectors as well as numbers.
+
The inverse of an n-by-n matrix can be calculated by creating an n-by-2n matrix which has the original matrix on the left and the identity matrix on the right.  Row reduce this matrix and the right half will be the inverse.  If the matrix does not row reduce completely (i.e., a row is formed with all zeroes as its entries), it does not have an inverse.
  
== Motivations and definitions ==
+
=== Example 1===
Say we have the vector <math>\begin{pmatrix} 1 \\ 0 \end{pmatrix}</math> in <math>\mathbb{R}^2</math>, and we rotate it through 90 degrees, to obtain the vector <math>\begin{pmatrix} 0 \\ 1 \end{pmatrix}</math>.
+
Let <math> \mathrm{A} = \begin{bmatrix}
 +
  1 & 4 & 4\\
 +
  2 & 5 & 8\\  
 +
  3 & 6 & 9
 +
\end{bmatrix}</math>
  
Another example instead of rotating a vector, we stretch it, so a vector <math>\mathbf{v}</math> becomes <math>2\mathbf{v}</math>, for example. <math>\begin{pmatrix} 2 \\ 3 \end{pmatrix}</math> becomes <math>\begin{pmatrix} 4 \\ 6 \end{pmatrix}</math>
+
We begin by expanding and partitioning A to include the identity matrix, and then proceed to row reduce A until we reach the identity matrix on the left-hand side.
  
Or, if we look at the ''projection'' of one vector onto the ''x'' axis - extracting its ''x'' component - , e.g. from
+
:<math>
<math>\begin{pmatrix} 2 \\ 3 \end{pmatrix}</math> we get <math>\begin{pmatrix} 2 \\ 0 \end{pmatrix}</math>
+
\begin{bmatrix}
 +
  1 & 4 & 4 & \big| & 1 & 0 &0\\
 +
  2 & 5 & 8 & \big| & 0 & 1 &0\\  
 +
  3 & 6 & 9 & \big| & 0 & 0 &1
 +
\end{bmatrix}
  
These examples are all an example of a ''mapping'' between two vectors, and are all linear transformations. If the rule transforming the matrix is called <math>T</math>, we often write <math>T\mathbf{v}</math> for the mapping of the vector <math>\mathbf{v}</math> by the rule <math>T</math>. <math>T</math> is often called the transformation.
+
\rightsquigarrow
  
Note we do not always write brackets like when we write functions. However we ''should'' write brackets, especially when we want to express the mapping of the sum or the product or the combination of many vectors.
+
\begin{bmatrix}
 +
  1 & 4 & 4 & \big| & 1 & 0 &0\\
 +
  0 & -3 & 0 & \big| & -2 & 1 &0\\
 +
  0 & -6 & -3 & \big| & -3 & 0 &1
 +
\end{bmatrix}
  
== Definitions ==
+
\rightsquigarrow
===Linear Operators===
 
  
Suppose one has a field K, and let x be an element of that field. Let O be a function taking values from K where O(x) is an element of a field J. Define O to be a linear form if and only if:
+
\begin{bmatrix}
# O(x+y)=O(x)+O(y)
+
  1 & 4 & 4 & \big| & 1 & 0 &0\\
# O(&lambda;x)=&lambda;O(x)
+
  0 & 1 & 0 & \big| & 2/3 & -1/3 &0\\
 +
  0 & -6 & -3 & \big| & -3 & 0 &1
 +
\end{bmatrix}
  
===Linear Forms===
+
\rightsquigarrow
Suppose one has a vector space V, and let x be an element of that vector space. Let F be a function taking values from V where F(x) is an element of a field K. Define F to be a linear form if and only if:
 
# F(x+y)=F(x)+F(y)
 
# F(&lambda;x)=&lambda;F(x)
 
  
===Linear Transformation===
+
</math>
This time, instead of a field, let us consider functions from one vector space into another vector space. Let T be a function taking values from one vector space V where L(V) are elements of another vector space. Define L to be a linear transformation when it:
+
# ''preserves scalar multiplication'': T(&lambda;'''x''') = &lambda;T'''x'''
+
# ''preserves addition'': T('''x'''+'''y''') = T'''x''' + T'''y'''
+
:<math>
  
Note that not all transformations are linear. Many simple transformations that are in the real world are also non-linear. Their study is more difficult, and will not be done here. For example, the transformation ''S'' (whose input and output are both vectors in '''R'''<sup>2</sup>) defined by
+
\begin{bmatrix}
 +
  1 & 0 & 4 & \big| & -5/3 & 4/3 &0\\
 +
  0 & 1 & 0 & \big| & 2/3 & -1/3 &0\\
 +
  0 & 0 & -3 & \big| & 1 & -2 &1
 +
\end{bmatrix}
  
<math>S\mathbf{x} = S\begin{pmatrix} x \\
+
\rightsquigarrow
                                    y  \end{pmatrix}= \begin{pmatrix}  xy\\
 
                                                                        \cos(y)\end{pmatrix}</math>
 
  
We can learn about nonlinear transformations by studying easier, linear ones.
+
\begin{bmatrix}
 +
  1 & 0 & 4 & \big| & -5/3 & 4/3 &0\\
 +
  0 & 1 & 0 & \big| & 2/3 & -1/3 &0\\
 +
  0 & 0 & 1 & \big| & -1/3 & 2/3 &-1/3
 +
\end{bmatrix}
  
We often ''describe'' a transformation T in the following way
+
\rightsquigarrow
:<math>T : V \rightarrow W</math>
 
  
This means that T, whatever transformation it may be, maps vectors in the vector space V to a vector in the vector space W.
+
\begin{bmatrix}
 +
  1 & 0 & 0 & \big| & -1/3 & -4/3 &4/3\\
 +
  0 & 1 & 0 & \big| & 2/3 & -1/3 &0\\
 +
  0 & 0 & 1 & \big| & -1/3 & 2/3 &-1/3
 +
\end{bmatrix}
  
The actual transformation ''could'' be written, for instance, as
 
:<math>T\begin{pmatrix} x \\ y\end{pmatrix} = \begin{pmatrix} x + y \\ x - y \end{pmatrix}</math>
 
  
== Examples and proofs ==
+
</math>
Here are some examples of some linear transformations. At the same time, let's look at how we can prove that a transformation we may find is linear or not.
+
<br><br>
 +
The matrix <math> \mathrm{B} = \begin{bmatrix}
 +
  -1/3 & -4/3 & 4/3\\
 +
  2/3 & -1/3 & 0\\
 +
  -1/3 & 2/3 & -1/3
 +
\end{bmatrix}
 +
</math> is then the inverse of the original matrix A.
  
=== Projection ===
 
Let us take the projection of vectors in '''R'''<sup>2</sup> to vectors on the ''x''-axis. Let's call this transformation T.
 
  
We know that T maps vectors from '''R'''<sup>2</sup> to '''R'''<sup>2</sup>, so we can say
+
==Inverse of a Linear Transformation==
: <math>T: \mathbb{R}^2 \rightarrow \mathbb{R}^2</math>
+
We now consider how to represent the inverse of a linear map. We start by recalling some facts about function
 +
inverses. Some functions have no inverse, or have an inverse on the left side
 +
or right side only.
  
and we can then write the transformation itself as
+
===Definitions===
: <math>T\begin{pmatrix} x_0 \\ x_1 \end{pmatrix} = \begin{pmatrix} x_0 \\ 0 \end{pmatrix}</math>
+
Where
 +
<math> \pi:\mathbb{R}^3\to \mathbb{R}^2 </math> is the projection map
  
Clearly this is linear. (''Can you see why, without looking below?'')
+
:<math>
 +
\begin{pmatrix} x \\ y \\ z \end{pmatrix}
 +
\mapsto
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
</math>
  
Let's go through a proof that the conditions in the definitions are established.
+
and <math> \eta:\mathbb{R}^2\to \mathbb{R}^3 </math> is the embedding 
  
==== Scalar multiplication is preserved ====
+
:<math>
We wish to show that for all vectors '''v''' and all scalars &lambda;, T(&lambda;'''v''')=&lambda;T('''v''').
+
\begin{pmatrix} x \\ y \end{pmatrix}
 +
\mapsto
 +
\begin{pmatrix} x \\ y \\ 0 \end{pmatrix}
 +
</math>
  
Let
+
the composition <math>\pi\circ \eta</math> is the identity map on <math>\mathbb{R}^2</math>.
: <math>\mathbf{v}=\begin{pmatrix} v_0 \\ v_1 \end{pmatrix}</math>.
 
Then
 
:<math>\lambda\mathbf{v}=\begin{pmatrix} \lambda v_0 \\ \lambda v_1 \end{pmatrix}</math>
 
Now
 
:<math> T(\lambda\mathbf{v}) = T\begin{pmatrix} \lambda v_0 \\ \lambda v_1\end{pmatrix} = </math>
 
:<math> \begin{pmatrix} \lambda v_0 \\ 0 \end{pmatrix} </math>
 
If we work out &lambda;T('''v''') and find it is the same vector, we have proved our result.
 
:<math> \lambda T\mathbf{v}= \lambda \begin{pmatrix} v_0 \\ 0 \end{pmatrix}=</math>
 
:<math> \begin{pmatrix} \lambda v_0 \\ 0 \end{pmatrix} </math>
 
This is the same vector as above, so under the transformation T, ''scalar multiplication is preserved''.
 
  
==== Addition is preserved ====
+
:<math>
We wish to show for all vectors '''x''' and '''y''', T('''x'''+'''y''')=T'''x'''+T'''y'''.
+
\begin{pmatrix} x \\ y \end{pmatrix}
 +
\stackrel{\eta}{\longmapsto}
 +
\begin{pmatrix} x \\ y \\ 0 \end{pmatrix}
 +
\stackrel{\pi}{\longmapsto}
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
</math>
  
Let
+
We say <math>\pi</math> is a '''left inverse map'''
: <math>\mathbf{x}=\begin{pmatrix} x_0 \\ x_1 \end{pmatrix}</math>.
+
of <math>\eta</math> or, what is the same thing,
and
+
that <math>\eta</math> is a '''right inverse map'''
: <math>\mathbf{y}=\begin{pmatrix} y_0 \\ y_1 \end{pmatrix}</math>.
+
of <math>\pi</math>.
Now
+
However, composition in the other order <math>\eta\circ \pi</math>  
: <math>T(\mathbf{x}+\mathbf{y})=T\left(\begin{pmatrix} x_0 \\ x_1 \end{pmatrix}+\begin{pmatrix} y_0 \\ y_1 \end{pmatrix}\right)=</math>
+
doesn't give the identity map&mdash; here is a vector that is not
: <math>T\begin{pmatrix} x_0 + y_0 \\ x_1 + y_1 \end{pmatrix} =</math>
+
sent to itself under <math>\eta\circ \pi</math>.  
: <math>\begin{pmatrix} x_0 + y_0 \\ 0 \end{pmatrix}</math>
 
Now if we can show T'''x'''+T'''y''' is this vector above, we have proved this result.
 
Proceed, then,
 
:<math>T\begin{pmatrix} x_0 \\ x_1 \end{pmatrix} + T\begin{pmatrix} y_0 \\ y_1 \end{pmatrix}=\begin{pmatrix} x_0 \\ 0 \end{pmatrix} + \begin{pmatrix} y_0 \\0 \end{pmatrix}=</math>
 
: <math>\begin{pmatrix} x_0 + y_0 \\ 0 \end{pmatrix}</math>
 
So we have that the transformation T ''preserves addition''.
 
  
==== Zero vector is preserved ====
+
:<math>
Clearly we have
+
\begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix}
: <math>T\begin{pmatrix} 0 \\ 0 \end{pmatrix} = \begin{pmatrix} 0 \\ 0 \end{pmatrix} </math>
+
\stackrel{\pi}{\longmapsto}
 +
\begin{pmatrix} 0 \\ 0 \end{pmatrix}
 +
\stackrel{\eta}{\longmapsto}
 +
\begin{pmatrix} 0 \\ 0 \\ 0 \end{pmatrix}
 +
</math>
  
==== Conclusion ====
+
In fact, the projection
We have shown T preserves addition, scalar multiplication and the zero vector. So T must be linear.
+
<math>\pi</math> has no left inverse at all.
 +
For, if <math>f</math> were to be a left inverse of <math>\pi</math>
 +
then we would have
  
== Disproof of linearity ==
+
:<math>
When we want to ''disprove'' linearity - that is, to ''prove'' that a transformation is ''not'' linear, we need only find one counter-example.
+
\begin{pmatrix} x \\ y \\ z \end{pmatrix}
 +
\stackrel{\pi}{\longmapsto}
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
\stackrel{f}{\longmapsto}
 +
\begin{pmatrix} x \\ y \\ z \end{pmatrix}
 +
</math>
  
If we can find just one case in which the transformation does not preserve addition, scalar multiplication, or the zero vector, we can conclude that the transformation is not linear.
+
for all of the infinitely many <math>z</math>'s. But no function <math>f</math> can send a single argument to more than one value.
  
For example, consider the transformation  
+
(An example of a function with no inverse on either side
: <math> T\begin{pmatrix} x \\ y\end{pmatrix} = \begin{pmatrix} x^3 \\ y^2\end{pmatrix}</math>
+
is the zero transformation on <math>\mathbb{R}^2</math>.)
  
We suspect it is not linear. To prove it is not linear, take the vector
+
Some functions have a '''two-sided inverse map''', another function that is the inverse of the first, both from the left and from the right. For instance, the map given by <math>\vec{v}\mapsto 2\cdot \vec{v}</math> has the two-sided inverse <math>\vec{v}\mapsto (1/2)\cdot\vec{v}</math>. 
: <math> \mathbf{v} = \begin{pmatrix} 2 \\ 2 \end{pmatrix} </math>
+
In this subsection we will focus on two-sided inverses. The appendix shows that a function has a two-sided inverse if and only if it is both one-to-one and onto. The appendix also shows that if a function <math>f</math> has a two-sided inverse then it is unique, and so it is called "the" inverse, and is denoted <math>f^{-1}</math>. So our purpose in this subsection is, where a linear map <math>h</math> has an inverse, to find the relationship between <math>{\rm Rep}_{B,D}(h)</math> and <math>{\rm Rep}_{D,B}(h^{-1})</math>.
then
 
: <math> T(2\mathbf{v}) = \begin{pmatrix} 64 \\ 16 \end{pmatrix}</math>
 
but
 
: <math> 2T(\mathbf{v}) = \begin{pmatrix} 16 \\ 8 \end{pmatrix}</math>
 
  
so we can immediately say T is not linear because it doesn't preserve scalar multiplication.
+
A matrix <math> G </math> is a '''left inverse matrix''' of the matrix <math> H </math> if <math> GH </math> is the identity matrix. It is a '''right inverse matrix''' if <math> HG </math> is the identity. A matrix <math>H</math> with a two-sided inverse is an '''invertible matrix'''. That two-sided inverse is called '''the inverse matrix''' and is denoted <math> H^{-1} </math>.
  
=== Problem set ===
+
Because of the correspondence between linear maps and matrices, statements about map inverses translate into statements about matrix inverses.
Given the above, determine whether the following transformations are in fact linear or not. Write down each transformation in the form T:V -> W, and identify V and W. (Answers follow to even-numbered questions):
 
# <math>T\begin{pmatrix} v_0 \\ v_1 \end{pmatrix} = \begin{pmatrix} v_0^2 + v_1 \\ v_1 \end{pmatrix}</math>
 
# <math>T\begin{pmatrix} v_0 \\ v_1 \end{pmatrix} = \begin{pmatrix} 1 \\ v_0 \end{pmatrix}</math>
 
# <math>T\begin{pmatrix} v_0 \\ v_1 \end{pmatrix} = \mathbf{0}</math>
 
# <math>T\begin{pmatrix} v_0 \\ v_1 \\ v_2 \end{pmatrix} = \begin{pmatrix} v_0 - v_2 \\ v_1 \end{pmatrix}</math>
 
  
==== Answers ====
+
===Lemmas and Theorems===
: 2. No. A check whether the zero vector is preserved readily confirms this fact. T : '''R'''<sup>2</sup> -> '''R'''<sup>2</sup>
+
* If a matrix has both a left inverse and a right inverse then the two are equal.
: 4. Yes. T : '''R'''<sup>3</sup> -> '''R'''<sup>2</sup>.
 
  
== Images and kernels ==
+
* A matrix is invertible if and only if it is nonsingular.
We have some fundamental concepts underlying linear transformations, such as the ''kernel'' and the ''image'' of a linear transformation, which are analogous to the ''zeros'' and ''range'' of a function.
+
** Proof: ''(For both results.)'' Given a matrix <math>H</math>, fix spaces of appropriate dimension for the domain and codomain. Fix bases for these spaces. With respect to these bases, <math>H</math> represents a map <math>h</math>. The statements are true about the map and therefore they are true about the matrix.
  
=== Kernel ===
+
* A product of invertible matrices is invertible&mdash; if <math> G </math> and <math> H </math> are invertible and if <math> GH </math> is defined then <math> GH </math> is invertible and <math> (GH)^{-1}=H^{-1}G^{-1} </math>.
The ''kernel'' of a linear transformation T: V -> W is the set of all vectors in V which are mapped to the zero vector in W, ie.,
+
** Proof: ''(This is just like the prior proof except that it requires two maps.)'' Fix appropriate spaces and bases and consider the represented maps <math> h </math> and <math> g </math>. Note that <math> h^{-1}g^{-1} </math> is a two-sided map inverse of <math> gh </math> since <math> (h^{-1}g^{-1})(gh) = h^{-1}(\mbox{id})h = h^{-1}h =\mbox{id} </math> and <math> (gh)(h^{-1}g^{-1}) = g(\mbox{id})g^{-1} = gg^{-1} = \mbox{id} </math>. This equality is reflected in the matrices representing the maps, as required.
: <math> \mathrm{ker}\ T = \{v \in V\ |\ T\mathbf{v} = \mathbf{0}\}</math>
 
  
Coincidentally because of the matr to the matrix equation A'''x'''='''0'''.
 
  
The kernel of a transform T: V->W is always a subspace of V. The dimension of a transform or a matrix is called the ''nullity''..
+
Here is the arrow diagram giving the relationship
 +
between map inverses and matrix inverses.
 +
It is a special case
 +
of the diagram for function composition and matrix multiplication.
  
=== Image ===
+
<center>
The ''image'' of a linear transformation T:V->W is the set of all vectors in W which were mapped from vectors in V. For example with the trivial mapping T:V->W such that T'''x'''='''0''', the image would be '''0'''. (''What would the kernel be?'').
+
[[Image:Linalg_matinv_arrow.png|x200px]]
 +
</center>
  
More formally, we say that the image of a transformation T:V->W is the set
+
Beyond its place in our general program of
: <math> \mathrm{im}\ T = \{w \in W\ |\ w=T\mathbf{v}\ \mathrm{and}\ \mathbf{v}\in V\}</math>
+
seeing how to represent map operations,  
 +
another reason for our interest in inverses comes from solving
 +
linear systems.
 +
A linear system is equivalent to a matrix equation, as here.
  
== Isomorphism ==
+
:<math>
 +
\begin{array}{*{2}{rc}r}
 +
x_1  &+  &x_2  &= &3  \\
 +
2x_1  &-  &x_2  &= &2 
 +
\end{array}
 +
\quad\Longleftrightarrow\quad
 +
\begin{pmatrix}
 +
1  &1  \\
 +
2  &-1
 +
\end{pmatrix}
 +
\begin{pmatrix} x_1 \\ x_2 \end{pmatrix}
 +
=
 +
\begin{pmatrix} 3 \\ 2 \end{pmatrix}
 +
\qquad\qquad (*)</math>
  
A linear transformation T:V -> W is an isomorphic transformation if it is:
+
By fixing spaces and bases (e.g., <math>\mathbb{R}^2, \mathbb{R}^2 </math> and <math>\mathcal{E}_2,\mathcal{E}_2</math>),
* one-to-one and onto.
+
we take the matrix <math>H</math> to represent some map <math>h</math>.
* kernel(T) = {0} and the range(T) = W.
+
Then solving the system is the same as
* an inverse of T exists.
+
asking: what domain vector <math>\vec{x}</math> is mapped by <math>h</math> to the result
* dim(V) = dim(W).
+
<math>\vec{d}\,</math>?
 +
If we could invert <math>h</math> then we could solve the system 
 +
by multiplying <math>{\rm Rep}_{D,B}(h^{-1})\cdot{\rm Rep}_{D}(\vec{d})</math>
 +
to get <math>{\rm Rep}_{B}(\vec{x})</math>.
 +
 
 +
===Example 2===
 +
We can find a left inverse for the matrix just given
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
m  &n  \\
 +
p  &q
 +
\end{pmatrix}
 +
\begin{pmatrix}
 +
1  &1  \\
 +
2  &-1
 +
\end{pmatrix}
 +
=
 +
\begin{pmatrix}
 +
1  &0  \\
 +
0  &1
 +
\end{pmatrix}
 +
</math>
 +
 
 +
by using Gauss' method to solve the resulting linear system.
 +
 
 +
:<math>
 +
\begin{array}{*{4}{rc}r}
 +
m  &+  &2n  &    &  &  &    &=  &1    \\
 +
m  &-  &n  &    &  &  &    &=  &0    \\
 +
&  &    &    &p  &+  &2q  &=  &0    \\
 +
&  &    &    &p  &- &q  &=  &1   
 +
\end{array}
 +
</math>
 +
 
 +
Answer: <math> m=1/3 </math>, <math> n=1/3 </math>, <math> p=2/3 </math>, and <math> q=-1/3 </math>.
 +
This matrix is actually the two-sided inverse of <math>H</math>,
 +
as can easily be checked.
 +
With it we can solve the system (<math>*</math>) above by
 +
applying the inverse.
 +
 
 +
:<math>
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
=\begin{pmatrix}
 +
1/3  &1/3  \\
 +
2/3  &-1/3
 +
\end{pmatrix}
 +
\begin{pmatrix} 3 \\ 2 \end{pmatrix}         
 +
=\begin{pmatrix} 5/3 \\ 4/3 \end{pmatrix}
 +
</math>
 +
 
 +
 
 +
====Remark====
 +
Why solve systems this way, when Gauss' method takes less arithmetic (this assertion can be made precise by counting the number of arithmetic operations, as computer algorithm designers do)? Beyond its conceptual appeal of fitting into our program of discovering how to represent the various map operations, solving linear systems by using the matrix inverse has at least two advantages.
 +
 
 +
First, once the work of finding an inverse has been done, solving a system with the same coefficients but different constants is easy and fast: if we change the entries on the right of the system (<math>*</math>) then we get a related problem
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
1  &1  \\
 +
2  &-1
 +
\end{pmatrix}
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
=
 +
\begin{pmatrix} 5 \\ 1 \end{pmatrix}
 +
</math>
 +
 
 +
with a related solution method.
 +
 
 +
:<math>
 +
\begin{pmatrix} x \\ y \end{pmatrix}
 +
=
 +
\begin{pmatrix}
 +
1/3  &1/3  \\
 +
2/3  &-1/3
 +
\end{pmatrix}
 +
\begin{pmatrix} 5 \\ 1 \end{pmatrix}
 +
=
 +
\begin{pmatrix} 2 \\ 3 \end{pmatrix}
 +
</math>
 +
 
 +
In applications, solving many systems having the same matrix of
 +
coefficients is common.
 +
 
 +
Another advantage of inverses is that we can
 +
explore a system's sensitivity to changes in the constants.
 +
For example, tweaking the <math>3</math> on the right of the system (<math>*</math>) to
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
1  &1  \\
 +
2  &-1
 +
\end{pmatrix}
 +
\begin{pmatrix} x_1 \\ x_2 \end{pmatrix}
 +
=
 +
\begin{pmatrix} 3.01 \\ 2 \end{pmatrix}
 +
</math>
 +
 
 +
can be solved with the inverse.
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
1/3  &1/3  \\
 +
2/3  &-1/3
 +
\end{pmatrix}
 +
\begin{pmatrix} 3.01 \\ 2 \end{pmatrix}
 +
=
 +
\begin{pmatrix} (1/3)(3.01)+(1/3)(2) \\ (2/3)(3.01)-(1/3)(2) \end{pmatrix}
 +
</math>
 +
 
 +
to show that <math> x_1 </math> changes by <math> 1/3 </math> of the tweak while <math> x_2 </math> moves by <math> 2/3 </math> of that tweak. This sort of analysis is used, for example, to decide how accurately data must be specified in a linear model to ensure that the solution has a desired accuracy.
 +
}}
 +
 
 +
We finish by describing the computational procedure
 +
usually used to find the inverse matrix.
 +
 
 +
* A matrix is invertible if and only if it can be written as the product of elementary reduction matrices. The inverse can be computed by applying to the identity matrix the same row steps, in the same order, as are used to Gauss-Jordan reduce the invertible matrix.
 +
** Proof: A matrix <math>H</math> is invertible if and only if it is nonsingular and thus Gauss-Jordan reduces to the identity. This reduction can be done with elementary matrices
 +
:::<math> R_{r}\cdot R_{r-1}\cdot\dots R_{1}\cdot H=I </math>.
 +
:::This equation gives the two halves of the result.
 +
 
 +
:::First, elementary matrices are invertible and their inverses are also elementary. Applying <math>R_r^{-1}</math> to the left of both sides of that equation, then <math>R_{r-1}^{-1}</math>, etc., gives <math>H</math> as the product of elementary matrices <math>H=R_1^{-1}\cdots R_r^{-1}\cdot I</math> (the <math>I</math> is here to cover the trivial <math>r=0</math> case).
 +
 
 +
:::Second, matrix inverses are unique and so comparison of the above equation with <math>H^{-1}H=I</math> shows that <math>H^{-1}=R_r\cdot R_{r-1}\dots R_1\cdot I</math>. Therefore, applying <math>R_1</math> to the identity, followed by <math>R_2</math>, etc., yields the inverse of <math>H</math>.
 +
 
 +
===Example 3===
 +
To find the inverse of
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
1  & 1  \\
 +
2  & -1
 +
\end{pmatrix}
 +
</math>
 +
 
 +
we do Gauss-Jordan reduction, meanwhile performing the same operations on
 +
the identity.
 +
For clerical convenience we write the matrix and the identity side-by-side,
 +
and do the reduction steps together.
 +
 
 +
:<math>\begin{array}{rcl}
 +
\left(\begin{array}{cc|cc}
 +
1  &1  &1  &0  \\
 +
2  &-1  &0  &1
 +
\end{array}\right)
 +
&\xrightarrow[]{-2\rho_1+\rho_2}
 +
&\left(\begin{array}{cc|cc}
 +
1  &1  &1  &0  \\
 +
0  &-3  &-2 &1
 +
\end{array}\right)                \\
 +
&\xrightarrow[]{-1/3\rho_2}
 +
&\left(\begin{array}{cc|cc}
 +
1  &1  &1  &0    \\
 +
0  &1  &2/3 &-1/3
 +
\end{array}\right)                  \\
 +
&\xrightarrow[]{-\rho_2+\rho_1}
 +
&\left(\begin{array}{cc|cc}
 +
1  &0  &1/3 &1/3  \\
 +
0  &1  &2/3 &-1/3
 +
\end{array}\right)
 +
\end{array}
 +
</math>
 +
This calculation has found the inverse.
 +
 
 +
:<math>
 +
\begin{pmatrix}
 +
1  & 1  \\
 +
2  & -1
 +
\end{pmatrix}^{-1}
 +
=
 +
\begin{pmatrix}
 +
1/3 &1/3  \\
 +
2/3 &-1/3
 +
\end{pmatrix}
 +
</math>
 +
 
 +
===Example 4===
 +
This one happens to start with a row swap.
 +
 
 +
:<math>\begin{array}{rcl}
 +
\left(\begin{array}{ccc|ccc}
 +
0  &3  &-1  &1  &0  &0  \\
 +
1  &0  &1  &0  &1  &0  \\
 +
1  &-1 &0  &0  &0  &1
 +
\end{array}\right)
 +
&\xrightarrow[]{\rho_1\leftrightarrow\rho_2}
 +
&  \left(\begin{array}{ccc|ccc}
 +
1  &0  &1  &0  &1  &0  \\
 +
0  &3  &-1  &1  &0  &0  \\
 +
1  &-1 &0  &0  &0  &1
 +
\end{array}\right)                            \\
 +
&\xrightarrow[]{-\rho_1+\rho_3}
 +
&  \left(\begin{array}{ccc|ccc}
 +
1  &0  &1  &0  &1  &0  \\
 +
0  &3  &-1  &1  &0  &0  \\
 +
0  &-1 &-1  &0  &-1 &1
 +
\end{array}\right)                            \\
 +
&\vdots                                  \\
 +
&\xrightarrow[]{}
 +
&  \left(\begin{array}{ccc|ccc}
 +
1  &0  &0  &1/4  &1/4  &3/4  \\
 +
0  &1  &0  &1/4  &1/4  &-1/4 \\
 +
0  &0  &1  &-1/4 &3/4  &-3/4
 +
\end{array}\right)
 +
\end{array}
 +
</math>
 +
 
 +
===Example 5===
 +
A non-invertible matrix is detected by the fact that the left half won't
 +
reduce to the identity.
 +
 
 +
:<math>
 +
\left(\begin{array}{cc|cc}
 +
1  &1  &1  &0  \\
 +
2  &2  &0  &1
 +
\end{array}\right)
 +
\xrightarrow[]{-2\rho_1+\rho_2}
 +
\left(\begin{array}{cc|cc}
 +
1  &1  &1  &0  \\
 +
0  &0  &-2 &1
 +
\end{array}\right)
 +
</math>
 +
 
 +
This procedure will find the inverse of a general <math>n \! \times \! n</math> matrix.
 +
The <math>2 \! \times \! 2</math> case is handy.
 +
 
 +
==Licensing==
 +
Content obtained and/or adapted from:
 +
* [https://en.wikibooks.org/wiki/Linear_Algebra/Inverses Inverses, Wikibooks: Linear Algebra] under a CC BY-SA license
 +
* [https://en.wikibooks.org/wiki/Linear_Algebra/The_Inverse_of_a_Matrix The Inverse of a Matrix, Wikibooks: Linear Algebra] under a CC BY-SA license

Latest revision as of 07:28, 3 November 2021

Inverse of an n-by-n matrix

An n-by-n matrix A is the inverse of n-by-n matrix B (and B the inverse of A) if BA = AB = I, where I is an identity matrix.

The inverse of an n-by-n matrix can be calculated by creating an n-by-2n matrix which has the original matrix on the left and the identity matrix on the right. Row reduce this matrix and the right half will be the inverse. If the matrix does not row reduce completely (i.e., a row is formed with all zeroes as its entries), it does not have an inverse.

Example 1

Let

We begin by expanding and partitioning A to include the identity matrix, and then proceed to row reduce A until we reach the identity matrix on the left-hand side.




The matrix is then the inverse of the original matrix A.


Inverse of a Linear Transformation

We now consider how to represent the inverse of a linear map. We start by recalling some facts about function inverses. Some functions have no inverse, or have an inverse on the left side or right side only.

Definitions

Where is the projection map

and is the embedding

the composition is the identity map on .

We say is a left inverse map of or, what is the same thing, that is a right inverse map of . However, composition in the other order doesn't give the identity map— here is a vector that is not sent to itself under .

In fact, the projection has no left inverse at all. For, if were to be a left inverse of then we would have

for all of the infinitely many 's. But no function can send a single argument to more than one value.

(An example of a function with no inverse on either side is the zero transformation on .)

Some functions have a two-sided inverse map, another function that is the inverse of the first, both from the left and from the right. For instance, the map given by has the two-sided inverse . In this subsection we will focus on two-sided inverses. The appendix shows that a function has a two-sided inverse if and only if it is both one-to-one and onto. The appendix also shows that if a function has a two-sided inverse then it is unique, and so it is called "the" inverse, and is denoted . So our purpose in this subsection is, where a linear map has an inverse, to find the relationship between and .

A matrix is a left inverse matrix of the matrix if is the identity matrix. It is a right inverse matrix if is the identity. A matrix with a two-sided inverse is an invertible matrix. That two-sided inverse is called the inverse matrix and is denoted .

Because of the correspondence between linear maps and matrices, statements about map inverses translate into statements about matrix inverses.

Lemmas and Theorems

  • If a matrix has both a left inverse and a right inverse then the two are equal.
  • A matrix is invertible if and only if it is nonsingular.
    • Proof: (For both results.) Given a matrix , fix spaces of appropriate dimension for the domain and codomain. Fix bases for these spaces. With respect to these bases, represents a map . The statements are true about the map and therefore they are true about the matrix.
  • A product of invertible matrices is invertible— if and are invertible and if is defined then is invertible and .
    • Proof: (This is just like the prior proof except that it requires two maps.) Fix appropriate spaces and bases and consider the represented maps and . Note that is a two-sided map inverse of since and . This equality is reflected in the matrices representing the maps, as required.


Here is the arrow diagram giving the relationship between map inverses and matrix inverses. It is a special case of the diagram for function composition and matrix multiplication.

Linalg matinv arrow.png

Beyond its place in our general program of seeing how to represent map operations, another reason for our interest in inverses comes from solving linear systems. A linear system is equivalent to a matrix equation, as here.

By fixing spaces and bases (e.g., and ), we take the matrix to represent some map . Then solving the system is the same as asking: what domain vector is mapped by to the result ? If we could invert then we could solve the system by multiplying to get .

Example 2

We can find a left inverse for the matrix just given

by using Gauss' method to solve the resulting linear system.

Answer: , , , and . This matrix is actually the two-sided inverse of , as can easily be checked. With it we can solve the system () above by applying the inverse.


Remark

Why solve systems this way, when Gauss' method takes less arithmetic (this assertion can be made precise by counting the number of arithmetic operations, as computer algorithm designers do)? Beyond its conceptual appeal of fitting into our program of discovering how to represent the various map operations, solving linear systems by using the matrix inverse has at least two advantages.

First, once the work of finding an inverse has been done, solving a system with the same coefficients but different constants is easy and fast: if we change the entries on the right of the system () then we get a related problem

with a related solution method.

In applications, solving many systems having the same matrix of coefficients is common.

Another advantage of inverses is that we can explore a system's sensitivity to changes in the constants. For example, tweaking the on the right of the system () to

can be solved with the inverse.

to show that changes by of the tweak while moves by of that tweak. This sort of analysis is used, for example, to decide how accurately data must be specified in a linear model to ensure that the solution has a desired accuracy. }}

We finish by describing the computational procedure usually used to find the inverse matrix.

  • A matrix is invertible if and only if it can be written as the product of elementary reduction matrices. The inverse can be computed by applying to the identity matrix the same row steps, in the same order, as are used to Gauss-Jordan reduce the invertible matrix.
    • Proof: A matrix is invertible if and only if it is nonsingular and thus Gauss-Jordan reduces to the identity. This reduction can be done with elementary matrices
.
This equation gives the two halves of the result.
First, elementary matrices are invertible and their inverses are also elementary. Applying to the left of both sides of that equation, then , etc., gives as the product of elementary matrices (the is here to cover the trivial case).
Second, matrix inverses are unique and so comparison of the above equation with shows that . Therefore, applying to the identity, followed by , etc., yields the inverse of .

Example 3

To find the inverse of

we do Gauss-Jordan reduction, meanwhile performing the same operations on the identity. For clerical convenience we write the matrix and the identity side-by-side, and do the reduction steps together.

This calculation has found the inverse.

Example 4

This one happens to start with a row swap.

Example 5

A non-invertible matrix is detected by the fact that the left half won't reduce to the identity.

This procedure will find the inverse of a general matrix. The case is handy.

Licensing

Content obtained and/or adapted from: