In mathematics, and in particular, algebra, a generalized inverse (or, g-inverse) of an element x is an element y that has some properties of an inverse element but not necessarily all of them. 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. 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 A {\displaystyle A} .
A matrix A g ∈ R n × m {\displaystyle A^{\mathrm {g} }\in \mathbb {R} ^{n\times m}} is a generalized inverse of a matrix A ∈ R m × n {\displaystyle A\in \mathbb {R} ^{m\times n}} if A A g A = A . {\displaystyle AA^{\mathrm {g} }A=A.} A generalized inverse exists for an arbitrary matrix, and when a matrix has a regular inverse, this inverse is its unique generalized inverse.