pseudoinverse
The inverse^{} ${A}^{1}$ of a matrix $A$ exists only if $A$ is square and has full rank. In this case, $Ax=b$ has the solution $x={A}^{1}b$.
The pseudoinverse^{} ${A}^{+}$ (beware, it is often denoted otherwise) is a generalization of the inverse, and exists for any $m\times n$ matrix. We assume $m>n$. If $A$ has full rank ($n$) we define:
$${A}^{+}={({A}^{T}A)}^{1}{A}^{T}$$ 
and the solution of $Ax=b$ is $x={A}^{+}b$.
More accurately, the above is called the MoorePenrose pseudoinverse^{}.
1 Calculation
The best way to compute ${A}^{+}$ is to use singular value decomposition^{}. With $A=US{V}^{T}$ , where $U$ and $V$ (both $n\times n$) orthogonal^{} and $S$ ($m\times n$) is diagonal^{} with real, nonnegative singular values ${\sigma}_{i}$, $i=1,\mathrm{\dots},n$. We find
$${A}^{+}=V{({S}^{T}S)}^{1}{S}^{T}{U}^{T}$$ 
If the rank $r$ of $A$ is smaller than $n$, the inverse of ${S}^{T}S$ does not exist, and one uses only the first $r$ singular values; $S$ then becomes an $r\times r$ matrix and $U$,$V$ shrink accordingly. see also Linear Equations.
2 Generalization
The term “pseudoinverse” is actually used for any operator $\mathrm{pinv}$ satisfying
$$M\mathrm{pinv}(M)M=M$$ 
for a $m\times n$ matrix $M$. Beyond this, pseudoinverses can be defined on any reasonable matrix identity.
References

•
Originally from The Data Analysis Briefbook (http://rkb.home.cern.ch/rkb/titleA.htmlhttp://rkb.home.cern.ch/rkb/titleA.html)
Title  pseudoinverse 

Canonical name  Pseudoinverse 
Date of creation  20130322 12:07:21 
Last modified on  20130322 12:07:21 
Owner  akrowne (2) 
Last modified by  akrowne (2) 
Numerical id  6 
Author  akrowne (2) 
Entry type  Definition 
Classification  msc 1500 
Classification  msc 6500 
Synonym  pseudoinverse 
Synonym  MoorePenrose pseudoinverse 
Related topic  MoorePenroseGeneralizedInverse 