Every m-by-n matrix A ∈ 𝔽m×n defines a linear transformation 𝔽n×1 ⇾ 𝔽m×1 by mapping every input x from domain 𝔽n×1 into output y = A x from codomain 𝔽m×1. Therefore, a matrix can be considered as a linear operator acting on finite dimensional column vector space. This transformation can be naturally extended to Cartesian product vector spaces, TA : 𝔽n ⇾ 𝔽m. The set of all outputs is called the range or image of the transformation.
Let X and Y be vector spaces over the same field 𝔽, and let
T : X ⇾ Y be a linear transformation. If there exists a linear map L : Y ⇾ X such that (L ∘ T)(x) = L(T)(x) = x for all x in the domain X, then L is called a left inverse of T.
If there exists a linear map R : Y ⇾ X such that
(T ∘ R)(y) =
T(R)(y) = y for all y in the domain Y, then R is called a right inverse of T.
Note the duality of right and left inverses: if L is a left inverse of T, then T is a right inverse for L. A finite dimensional case of vector spaces leads to a similar definitions for matrices. Namely, if for matrix A ∈ 𝔽m×n there exist matrix L ∈ 𝔽n×m such that L A = In, the identity matrix of dimension n, then L is called a left inverse of A. If for a matrix R ∈ 𝔽n×m we have A R = Im, then R is said to be a right inverse of T.
Left inverse
Recall that m × n matrix A has full column rank if its columns are linearly independent; i.e., if matrix rank r = n. These matrices usually have "tall" shape. Tall full rank matrices only have left inverses.
In this case when the number m of rows exceeds or equal to (m ≥ n) the number of columns n, the nullspace of A contains just the zero vector. The equation A x = b either has exactly one solution or is not solvable.
Mathematica code below serves to display any matrix as a matrix rather than the default display which is as a list of lists
$Post := If[MatrixQ[#1], MatrixForm[#1], #1] &
Theorem 1:
Let X and Y be vector spaces over the same field 𝔽, and let
T : X ⇾ Y be a linear transformation.
The transformation T has left inverse if and only if it is 1-to-1, i.e., injective.
Suppose there exists a left inverse L of T. To see that T is injective, let u, v ∈ X such that T(u) = T(v). Then
\[
{\bf u} = L \left( T({\bf u}) \right) = L \left( T({\bf v}) \right) = {\bf v} .
\]
If T is not injective, then there exists v ≠ 0 such that T(v) = 0, so T maps two distinct elements v and 0 into one (zero vector). Then the left inverse to T does not exist because L cannot restore v:
\[
L \left( T({\bf v}) \right) = L \left( T({\bf 0}) \right) = {\bf 0} \ne {\bf v} .
\]
Another constructive proof. Suppose that T is injective. Let α = {xi : i ∈ I} be a basis for X. Then β = {T(xi) : i ∈ I} is a linearly independent set that generates subspace U ⊆ Y. There exists a basis γ of Y that contains β. We construct a left inverse map L for T by the rule
\[
L({\bf u}) = \begin{cases}
{\bf v} , & \quad \mbox{if} \quad {\bf u} \in \mbox{span}\{ \beta \}, \quad \mbox{with} \quad {\bf u} = T({\bf v}) ,
\\
{\bf 0} , & \quad \mbox{if} \quad {\bf u} \not\in \mbox{span}\{\beta \} .
\end{cases}
\]
Then for \( \displaystyle {\bf x} = \sum_i c_i {\bf x}_i \in X , \quad \) we have
\[
L \left( T({\bf x}) \right) = L\,T \left( \sum_i c_i {\bf x}_i \right) = \sum_i c_i L\,T \left( {\bf x}_i \right) = \sum_i c_i {\bf x}_i = {\bf x} .
\]
Hence, L is a left inverse of T.
Example 1:
We consider the 3 × 2 matrix
\[
{\bf A} = \begin{bmatrix} 1&2 \\ 3&4 \\ 5&6 \end{bmatrix} .
\]
To find all left inverse matrices, we need to solve the equation X A = I, i.e.,
\[
\begin{bmatrix} x_1 & x_2 & x_3 \\ x_4 & x_5 & x_6 \end{bmatrix} \cdot \begin{bmatrix} 1&2 \\ 3&4 \\ 5&6 \end{bmatrix} = \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix}
\]
Actually, this system of four equations contains two unrelated systems (one for variables x₁, x₂, x₃ and another for variables x₄, x₅, x₆), and we solve each of them separately.
To solve the first system of equations, we build the augmented matrix
\[
{\bf M} = \left[ \begin{array}{ccc|c} 1&3&5&1 \\ 2&4&6&0 \end{array} \right] .
\]
Then we convert this matrix to the reduced row echelon form
Reading last line, we obtain one equation with two unknowns (one of which cannot be determined, so it plays the role of a free variable)
\[
x_2 + 2\, x_3 = 1 \qquad \Longrightarrow \qquad x_2 = 1 - 2\, x_3 .
\]
This form tells us that the system has infinite many solutions with one free variable, say x₃, which we denote by t. Then
\[
x_1 = -2 +t, \quad x_2 = 1 - 2t , \quad x_3 = t, \qquad t \in \mathbb{R} .
\]
We check with another command:
Therefore, the left inverse is not unique and depends on two real parameters:
\[
{\bf P} = \begin{bmatrix} -2 & 1& 0 \\ \frac{3}{2} & -\frac{1}{2} &0 \end{bmatrix} + \begin{bmatrix} t & -2t & t \\ s &-2s& s \end{bmatrix} , \qquad t,s \in \mathbb{R} .
\]
We check our answer with Mathematica:
A = {{1, 2}, {3, 4}, {5, 6}};
P = {{-2, 1, 0}, {3/2, -1/2, 0}};
P.A
{{1, 0}, {0, 1}}
We also check that matrix \( \displaystyle \quad {\bf C} =
\begin{bmatrix} t&-2t&t \\ s&-2s&s \end{bmatrix} \quad \) annihilates (here it means to make a zero matrix) A:
A = {{1, 2}, {3, 4}, {5, 6}} ;
c = {{t, -2*t, t}, {s, -2*s, s}} ;
c.A
{{0, 0}, {0, 0}}
End of Example 1
The n × n matrix ATA is symmetric and non-singular for every full column rank matrix A. Hence, (ATA)−1ATA = In, the identity matrix. In this case, matrix (ATA)−1AT is left inverse, which we denote by \( \displaystyle {\bf A}_{left}^{-1} . \) Note that this left inverse is not unique and there are could be many others.
Note that the left inverse is an n × m matrix, with m ≤ n. It can be also right inverse only when m = n. For a given left inverse \( \displaystyle {\bf A}_{left}^{-1} , \) adding a matrix C such that C A = 0 induces another left inverse.
Right inverse
If m × n matrix A has full row rank, then r = m. We will call such matrices "wide." The nullspace of AT contains only the zero
vector; the rows of A are independent. The equation A x = b always has at
least one solution; the nullspace of A has dimension n − m, so there will be
n − m free variables and (if n > m) infinitely many solutions!
Theorem 2:
Let X and Y be vector spaces over the same field 𝔽, and let
T : X ⇾ Y be a linear transformation.
The transformation T has right inverse if and only if it is onto, i.e., surjective.
If T is not onto, then its image is a proper subset of codomainY. So there exists an vector y ∈ Y that is not in the range of
T is not onto, then its image is a proper subset of codomainY. So there exists an vector y ∈ Y that is not in the range of
T. Then a right inverse does not restore y.
Now suppose that T is surjective. Let α = {xi : i ∈ I} be a basis of X. Then T(α) generates Y. Then there exits a subset β ⊆ T(α) that is a basis in Y. Now for every vector yi in β, yi = T(xi) for some vector xi ∈ X. The vector xi may not be unique, but that does not matter. Let R : Y ⇾ X be the linear transformation defined by R(yi) = xi. Then
for each vector yi in the basis β of Y, T R(yi) = T(xi) = yi. This means that R is a right inverse of T.
On the other hand, suppose there is a linear transformation U : Y ⇾ X with T U = I. Then for any vector y ∈ Y,
\[
{\bf y} = I({\bf y}) = T\,R({\bf y}) = T\left( R({\bf y}) \right)
\]
and so T is surjective.
Example 2:
We consider a wide 2-by-3 matrix
\[
{\bf B} = \begin{bmatrix} 1&2&3 \\ 4&5&6 \end{bmatrix} .
\]
Its product with its transpose is a symmetric square matrix,
\[
{\bf B}\, {\bf B}^{\mathrm T} = \begin{bmatrix} 14 & 32 \\ 32&77 \end{bmatrix} \qquad \Longrightarrow \qquad \left( {\bf B}\, {\bf B}^{\mathrm T} \right)^{-1} = \frac{1}{54} \begin{bmatrix} \phantom{-}77 & -32 \\ -32 & \phantom{-}14 \end{bmatrix} .
\]
But another symmetric matrix BTB is not invertible because its determinant is zero.
\[
{\bf B}^{\mathrm T} {\bf B} = \begin{bmatrix} 17&22&27 \\ 22& 29& 36 \\ 27& 36& 45 \end{bmatrix} .
\]
\[
x_1 - \frac{5}{3} +t , \quad x_2 = \frac{4}{3} - 2t , \quad x_3 = t, \qquad t \in \mathbb{R} .
\]
We repeat a similar procedure for other three variables (x₄, x₅, x₆).
Also, matrix \( \displaystyle \quad {\bf C} = \begin{bmatrix} \phantom{-}t&\phantom{-}s \\ -2t & -2s \\ \phantom{-}t&\phantom{-}s \end{bmatrix} \quad \) annihilates matrix B from right, so B C = 0. So for any real values of s, t, matrix C belongs to right null space of B.
Matrices with full row rank have right inverses \( \displaystyle {\bf A}_{right}^{-1} , \) with \( \displaystyle {\bf A}\,{\bf A}_{right}^{-1} = {\bf I} . \) We can choose as a right inverse the n × m matrix AT(AAT)−1.
Theorem 3:
An n × m matrix X is left inverse of an m × n matrix A if and only if its adjointX* is right inverse of A*.
This statement is just a reformulation of two previous theorems showing their duality.
Example 3:
We consider the 3 × 2 matrix (tall)
\[
{\bf A} = \begin{bmatrix} 1&2 \\ 3&4 \\ 5&6 \end{bmatrix} .
\]
First, we check that A is a full rank matrix:
Tall matrix A has no right inverse matrix, but its transpose does. We use a duality rule and apply transposition to A and its left inverse:
\[
{\bf A}^{\mathrm T} \left( \left( {\bf A}^{\mathrm T} {\bf A} \right)^{-1} {\bf A}^{\mathrm T} \right)^{\mathrm T} = {\bf I} \qquad \iff \qquad \begin{bmatrix} 1&3&5 \\ 2&4&6 \end{bmatrix} \,\begin{bmatrix} -\frac{4}{3} & \phantom{-}\frac{13}{12} \\ -\frac{1}{3} & \phantom{-}\frac{1}{3} \\ \phantom{-}\frac{2}{3}& - \frac{5}{12}\end{bmatrix} = \begin{bmatrix} 1&0 \\ 0&1 \end{bmatrix} .
\]
Transpose[A] . Transpose[left]
{{1, 0}, {0, 1}}
We can slightly simplify the transpose to the left inverse:
\[
\left( {\bf A}^{\mathrm T} \right)_{right}^{-1} = \left( \left( {\bf A}^{\mathrm T} {\bf A} \right)^{-1} {\bf A}^{\mathrm T} \right)^{\mathrm T} = {\bf A} \left( {\bf A}^{\mathrm T} {\bf A} \right)^{-1} .
\]
Frame, J.S., A simple recursion formula for inverting a matrix,
Bulletin of the American Mathematical Society, 1949, Vol. 55, p. 1045. doi:10.1090/S0002-9904-1949-09310-2
Greenspan, D., Methods of matrix inversion, The American mathematical Monthly, 1955, Vol. 62, No. pp. 303--318.