The Moore-Penrose pseudoinverse is a matrix B
of the same dimensions as A'
satisfying four conditions:
The computation is based on svd(A)
and any singular values less than tol
are treated as zero.
The Moore-Penrose inverse satisfies
BB^+B = B
B^+BB^+ = B^+
(BB^+)^(H) = BB^+
(B^+B)^(H) = B^+B,
where B^(H) is the conjugate transpose.
It is also true that
z=B^+c
is the shortest length least squares solution to the problem
Bz=c.
If the inverse of (B^(H)B) exists, then
B^+=(B^(H)B)^(-1)B^(H),
as can be seen by premultiplying both sides of (6) by B^(H) to create a square matrix which can then be inverted,
B^(H)Bz=B^(H)c,
giving
z = (B^(H)B)^(-1)B^(H)c
= B^+c.