# Generalized inverse

"Pseudoinverse" redirects here. For the Moore–Penrose pseudoinverse, sometimes referred to as "the pseudoinverse", see Moore–Penrose pseudoinverse.

In mathematics, a generalized inverse of a matrix A is a matrix that has some properties of the inverse matrix of A but not necessarily all of them. 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}$.

The purpose of constructing a generalized inverse is to obtain a matrix that can serve as the 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 an inverse, then this inverse is its unique generalized inverse. Some generalized inverses can be defined in any mathematical structure that involves associative multiplication, that is, in a semigroup.

## Motivation for the generalized inverse

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 range space of ${\displaystyle A}$. If the matrix ${\displaystyle A}$ is nonsingular, then ${\displaystyle x=A^{-1}y}$ will be the solution of the system. Note that, if a matrix ${\displaystyle A}$ is nonsingular, then

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

Suppose the matrix ${\displaystyle A}$ is singular, or ${\displaystyle n\neq m}$. 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.}$

That is, ${\displaystyle 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 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.}$

## Construction of generalized inverse

The following characterizations are easy to verify:

1. If ${\displaystyle A=BC}$ is a rank factorization, then ${\displaystyle G=C_{r}^{-}B_{l}^{-}}$ is a g-inverse of ${\displaystyle A}$, where ${\displaystyle C_{r}^{-}}$ is a right inverse of ${\displaystyle C}$ and ${\displaystyle B_{l}^{-}}$ is left inverse of ${\displaystyle B}$.
2. 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}$.
3. 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 g-inverse of ${\displaystyle A}$.

## Types of generalized inverses

The Penrose conditions are used to 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 (AA^{\mathrm {g} })^{\mathrm {T} }=AA^{\mathrm {g} }}$
4. ${\displaystyle (A^{\mathrm {g} }A)^{\mathrm {T} }=A^{\mathrm {g} }A}$

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 generalized reflexive inverse of ${\displaystyle A}$. If it satisfies all four conditions, then it is a Moore–Penrose pseudoinverse of ${\displaystyle A}$.

Other kinds of generalized inverse include:

• One-sided inverse (left inverse or right inverse): If the matrix ${\displaystyle A}$ has dimensions ${\displaystyle n\times m}$ and is full rank, then use the left inverse if ${\displaystyle n>m}$ and the right inverse if ${\displaystyle n.
• Left inverse is given by ${\displaystyle A_{\mathrm {left} }^{-1}=\left(A^{\mathrm {T} }A\right)^{-1}A^{\mathrm {T} }}$, i.e., ${\displaystyle A_{\mathrm {left} }^{-1}A=I_{m}}$, where ${\displaystyle I_{m}}$ is the ${\displaystyle m\times m}$ identity matrix.
• Right inverse is given by ${\displaystyle A_{\mathrm {right} }^{-1}=A^{\mathrm {T} }\left(AA^{\mathrm {T} }\right)^{-1}}$, i.e., ${\displaystyle AA_{\mathrm {right} }^{-1}=I_{n}}$, where ${\displaystyle I_{n}}$ is the ${\displaystyle n\times n}$ identity matrix.
• Drazin inverse
• Bott–Duffin inverse
• Moore–Penrose pseudoinverse

## 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.[1] 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+[I-A^{\mathrm {g} }A]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}$.