# Generalized inverse

In mathematics, and in particular, algebra, a generalized inverse of an element x is an element y that has some properties of an inverse element but not necessarily all of them. Generalized inverses can be defined in any mathematical structure that involves associative multiplication, that is, in a semigroup. This article describes generalized inverses of a matrix ${\displaystyle A}$.

Formally, given a matrix ${\displaystyle A\in \mathbb {R} ^{n\times m}}$ and a matrix ${\displaystyle A^{\mathrm {g} }\in \mathbb {R} ^{m\times n}}$, ${\displaystyle A^{\mathrm {g} }}$ is a generalized inverse of ${\displaystyle A}$ if it satisfies the condition ${\displaystyle AA^{\mathrm {g} }A=A.}$[1][2][3]

The purpose of constructing a generalized inverse of a matrix is to obtain a matrix that can serve as an inverse in some sense for a wider class of matrices than invertible matrices. A generalized inverse exists for an arbitrary matrix, and when a matrix has a regular inverse, this inverse is its unique generalized inverse.[4]

## Motivation

Consider the linear system

${\displaystyle Ax=y}$

where ${\displaystyle A}$ is an ${\displaystyle n\times m}$ matrix and ${\displaystyle y\in {\mathcal {R}}(A),}$ the column space of ${\displaystyle A}$. If ${\displaystyle A}$ is nonsingular (which implies ${\displaystyle n=m}$) then ${\displaystyle x=A^{-1}y}$ will be the solution of the system. Note that, if ${\displaystyle A}$ is nonsingular, then

${\displaystyle AA^{-1}A=A.}$

Now suppose ${\displaystyle A}$ is rectangular (${\displaystyle n\neq m}$), or square and singular. Then we need a right candidate ${\displaystyle G}$ of order ${\displaystyle m\times n}$ such that for all ${\displaystyle y\in {\mathcal {R}}(A),}$

${\displaystyle AGy=y.}$[5]

That is, ${\displaystyle x=Gy}$ is a solution of the linear system ${\displaystyle Ax=y}$. Equivalently, we need a matrix ${\displaystyle G}$ of order ${\displaystyle m\times n}$ such that

${\displaystyle AGA=A.}$

Hence we can define the generalized inverse or g-inverse as follows: Given an ${\displaystyle n\times m}$ matrix ${\displaystyle A}$, an ${\displaystyle m\times n}$ matrix ${\displaystyle G}$ is said to be a generalized inverse of ${\displaystyle A}$ if ${\displaystyle AGA=A.}$[6][7][8] The matrix ${\displaystyle A^{-1}}$ has been termed a regular inverse of ${\displaystyle A}$ by some authors.[9]

## Types

The Penrose conditions define different generalized inverses for ${\displaystyle A\in \mathbb {R} ^{n\times m}}$ and ${\displaystyle A^{\mathrm {g} }\in \mathbb {R} ^{m\times n}:}$

1. ${\displaystyle AA^{\mathrm {g} }A=A}$
2. ${\displaystyle A^{\mathrm {g} }AA^{\mathrm {g} }=A^{\mathrm {g} }}$
3. ${\displaystyle \left(AA^{\mathrm {g} }\right)^{*}=AA^{\mathrm {g} }}$
4. ${\displaystyle \left(A^{\mathrm {g} }A\right)^{*}=A^{\mathrm {g} }A,}$

where ${\displaystyle {}^{*}}$ indicates conjugate transpose. If ${\displaystyle A^{\mathrm {g} }}$ satisfies the first condition, then it is a generalized inverse of ${\displaystyle A}$. If it satisfies the first two conditions, then it is a reflexive generalized inverse of ${\displaystyle A}$. If it satisfies all four conditions, then it is the pseudoinverse of ${\displaystyle A}$.[10][11][12][13] A pseudoinverse is sometimes called the Moore–Penrose inverse, after the pioneering works by E. H. Moore and Roger Penrose.[14][15][16][17][18]

When ${\displaystyle A}$ is non-singular, any generalized inverse ${\displaystyle A^{\mathrm {g} }=A^{-1}}$ and is unique, but in all other cases, there are an infinite number of matrices that satisfy condition (1). However, the Moore–Penrose inverse is unique.[19]

There are other kinds of generalized inverse:

• One-sided inverse (right inverse or left inverse)
• Right inverse: If the matrix ${\displaystyle A}$ has dimensions ${\displaystyle n\times m}$ and ${\displaystyle {\text{rank}}(A)=n,}$ then there exists an ${\displaystyle m\times n}$ matrix ${\displaystyle A_{\text{R}}^{-1}}$ called the right inverse of ${\displaystyle A}$ such that ${\displaystyle AA_{\text{R}}^{-1}=I_{n},}$ where ${\displaystyle I_{n}}$ is the ${\displaystyle n\times n}$ identity matrix.
• Left inverse: If the matrix ${\displaystyle A}$ has dimensions ${\displaystyle n\times m}$ and ${\displaystyle \operatorname {rank} (A)=m}$, then there exists an ${\displaystyle m\times n}$ matrix ${\displaystyle A_{\text{L}}^{-1}}$ called the left inverse of ${\displaystyle A}$ such that ${\displaystyle A_{\text{L}}^{-1}A=I_{m},}$ where ${\displaystyle I_{m}}$ is the ${\displaystyle m\times m}$ identity matrix.[20]

## Examples

### Reflexive generalized inverse

Let

${\displaystyle A={\begin{bmatrix}1&2&3\\4&5&6\\7&8&9\end{bmatrix}},\quad G={\begin{bmatrix}-{\frac {5}{3}}&{\frac {2}{3}}&0\\[4pt]{\frac {4}{3}}&-{\frac {1}{3}}&0\\[4pt]0&0&0\end{bmatrix}}.}$

Since ${\displaystyle \det(A)=0}$, ${\displaystyle A}$ is singular and has no regular inverse. However, ${\displaystyle A}$ and ${\displaystyle G}$ satisfy conditions (1) and (2), but not (3) or (4). Hence, ${\displaystyle G}$ is a reflexive generalized inverse of ${\displaystyle A}$.

### One-sided inverse

Let

${\displaystyle A={\begin{bmatrix}1&2&3\\4&5&6\end{bmatrix}},\quad A_{\mathrm {R} }^{-1}={\begin{bmatrix}-{\frac {17}{18}}&{\frac {8}{18}}\\[4pt]-{\frac {2}{18}}&{\frac {2}{18}}\\[4pt]{\frac {13}{18}}&-{\frac {4}{18}}\end{bmatrix}}.}$

Since ${\displaystyle A}$ is not square, ${\displaystyle A}$ has no regular inverse. However, ${\displaystyle A_{\mathrm {R} }^{-1}}$ is a right inverse of ${\displaystyle A}$. The matrix ${\displaystyle A}$ has no left inverse.

## Construction

The following characterizations are easy to verify:

1. A right inverse of a non-square matrix ${\displaystyle A}$ is given by ${\displaystyle A_{\mathrm {R} }^{-1}=A^{\mathsf {T}}\left(AA^{\mathsf {T}}\right)^{-1}}$, provided A has full row rank.[21]
2. A left inverse of a non-square matrix ${\displaystyle A}$ is given by ${\displaystyle A_{\mathrm {L} }^{-1}=\left(A^{\mathsf {T}}A\right)^{-1}A^{\mathsf {T}}}$, provided A has full column rank.[22]
3. If ${\displaystyle A=BC}$ is a rank factorization, then ${\displaystyle G=C_{\mathrm {R} }^{-1}B_{\mathrm {L} }^{-1}}$ is a g-inverse of ${\displaystyle A}$, where ${\displaystyle C_{\mathrm {R} }^{-1}}$ is a right inverse of ${\displaystyle C}$ and ${\displaystyle B_{\mathrm {L} }^{-1}}$ is left inverse of ${\displaystyle B}$.
4. If ${\displaystyle A=P{\begin{bmatrix}I_{r}&0\\0&0\end{bmatrix}}Q}$ for any non-singular matrices ${\displaystyle P}$ and ${\displaystyle Q}$, then ${\displaystyle G=Q^{-1}{\begin{bmatrix}I_{r}&U\\W&V\end{bmatrix}}P^{-1}}$ is a generalized inverse of ${\displaystyle A}$ for arbitrary ${\displaystyle U,V}$ and ${\displaystyle W}$.
5. Let ${\displaystyle A}$ be of rank ${\displaystyle r}$. Without loss of generality, let
${\displaystyle A={\begin{bmatrix}B&C\\D&E\end{bmatrix}},}$

where ${\displaystyle B_{r\times r}}$ is the non-singular submatrix of ${\displaystyle A}$. Then,

${\displaystyle G={\begin{bmatrix}B^{-1}&0\\0&0\end{bmatrix}}}$
is a generalized inverse of ${\displaystyle A}$.
6. Let ${\displaystyle A}$ have singular-value decomposition ${\displaystyle U{\boldsymbol {\Sigma }}V^{*}}$ (where ${\displaystyle V^{*}}$ is the conjugate transpose of ${\displaystyle V}$). Then the pseudoinverse of ${\displaystyle A}$ is
${\displaystyle A^{+}=V{\boldsymbol {\Sigma }}^{+}U^{*}}$
where the diagonal matrix Σ+ is the pseudoinverse of Σ, which is formed by replacing every non-zero diagonal entry by its reciprocal and transposing the resulting matrix.[23]

## Uses

Any generalized inverse can be used to determine whether a system of linear equations has any solutions, and if so to give all of them. If any solutions exist for the n × m linear system

${\displaystyle Ax=b}$,

with vector ${\displaystyle x}$ of unknowns and vector ${\displaystyle b}$ of constants, all solutions are given by

${\displaystyle x=A^{\mathrm {g} }b+\left[I-A^{\mathrm {g} }A\right]w}$,

parametric on the arbitrary vector ${\displaystyle w}$, where ${\displaystyle A^{\mathrm {g} }}$ is any generalized inverse of ${\displaystyle A}$. Solutions exist if and only if ${\displaystyle A^{\mathrm {g} }b}$ is a solution, that is, if and only if ${\displaystyle AA^{\mathrm {g} }b=b}$. If A has full column rank, the bracketed expression in this equation is the zero matrix and so the solution is unique.[24]

## Transformation consistency properties

In practical applications it is necessary to identify the class of matrix transformations that must be preserved by a generalized inverse. For example, the Moore-Penrose inverse, ${\displaystyle A^{\mathrm {P} },}$ satisfies the following definition of consistency with respect to transformations involving unitary matrices U and V:

${\displaystyle (UAV)^{\mathrm {P} }=V^{*}A^{\mathrm {P} }U^{*}}$.

The Drazin inverse, ${\displaystyle A^{\mathrm {D} }}$ satisfies the following definition of consistency with respect to similarity transformations involving a nonsingular matrix S:

${\displaystyle \left(SAS^{-1}\right)^{\mathrm {D} }=SA^{\mathrm {D} }S^{-1}}$.

The unit-consistent (UC) inverse,[25] ${\displaystyle A^{\mathrm {U} },}$ satisfies the following definition of consistency with respect to transformations involving nonsingular diagonal matrices D and E:

${\displaystyle (DAE)^{\mathrm {U} }=E^{-1}A^{\mathrm {U} }D^{-1}}$.

The fact that the Moore-Penrose inverse provides consistency with respect to rotations (which are orthonormal transformations) explains its widespread use in physics and other applications in which Euclidean distances must be preserved. The UC inverse, by contrast, is applicable when system behavior is expected to be invariant with respect to the choice of units on different state variables, e.g., miles versus kilometers.

## Notes

1. ^ Ben-Israel & Greville (2003, pp. 2,7)
2. ^ Nakamura (1991, pp. 41–42)
3. ^ Rao & Mitra (1971, pp. vii,20)
4. ^ Ben-Israel & Greville (2003, pp. 2,7)
5. ^ Rao & Mitra (1971, p. 24)
6. ^ Ben-Israel & Greville (2003, pp. 2,7)
7. ^ Nakamura (1991, pp. 41–42)
8. ^ Rao & Mitra (1971, pp. vii,20)
9. ^ Rao & Mitra (1971, pp. 19–20)
10. ^ Ben-Israel & Greville (2003, p. 7)
11. ^ Campbell & Meyer (1991, p. 9)
12. ^ Nakamura (1991, pp. 41–42)
13. ^ Rao & Mitra (1971, pp. 20,28,51)
14. ^ Ben-Israel & Greville (2003, p. 7)
15. ^ Campbell & Meyer (1991, p. 10)
16. ^ James (1978, p. 114)
17. ^ Nakamura (1991, p. 42)
18. ^ Rao & Mitra (1971, p. 50–51)
19. ^ James (1978, pp. 113–114)
20. ^ Rao & Mitra (1971, p. 19)
21. ^ Rao & Mitra (1971, p. 19)
22. ^ Rao & Mitra (1971, p. 19)
23. ^ Horn & Johnson (1985, pp. 421)
24. ^ James (1978, pp. 109–110)
25. ^ Uhlmann, J.K. (2018), A Generalized Matrix Inverse that is Consistent with Respect to Diagonal Transformations, SIAM Journal on Matrix Analysis, 239:2, pp. 781–800