MoorePenrose inverse of a matrix
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
linalg::pseudoInverse(A
)
linalg::pseudoInverse(A)
computes the MoorePenrose
inverse of A.
If the MoorePenrose inverse of A
does not
exist, then FAIL
is returned.
The component ring of the matrix A
must be
a field, i.e., a domain of category Cat::Field
.
The MoorePenrose inverse of the 2×3 matrix:
A := Dom::Matrix(Dom::Complex)([[1, I, 3], [1, 3, 2]])
is the 3×2 matrix:
Astar := linalg::pseudoInverse(A)
Note that in this example, only:
A * Astar
yields the identity matrix, but not (see "Backgrounds" below):
Astar * A

A matrix of category 
Matrix of the same domain type as A
, or the
value FAIL
.
For an invertible matrix A, the MoorePenrose inverse A^{*} of A coincides with the inverse of A. In general, only A A^{*} A = A and A^{*} A A^{*} = A^{*} holds.
If A is of dimension m×n, then A^{*} is of dimension n×m.
The computation of the MoorePenrose inverse requires the existence
of a scalar product on the vector space K^{n},
where K is
the coefficient field of the matrix A.
This is only the case for some fields K in
theory, but linalg::scalarProduct
works also for
vectors over other fields (e.g. finite fields). The computation of
a MoorePenrose inverse may fail in such cases.