Finding pseudoinverse of “non linearly-independent” matrix

matricespseudoinverse

If:

  1. If $A$ has linearly independent columns, $A^+=\left(A^*A\right)^{-1}A^*$

  2. If $A$ has linearly independent rows, $A^+=A^*\left(AA^*\right)^{-1}$

  3. Otherwise, use the SVD decomposition.

Is it possible to avoid using SVD decomposition?

I've found the following method (https://www.omnicalculator.com/math/pseudoinverse#how-to-calculate-the-pseudoinverse):

  1. Start by calculating $AA^T$ and row reduce it to reduced row echelon form.
  2. Take the non-zero rows of the result and make them the columns of a new matrix $P$.
  3. Similarly, row-reduce $A^TA$ and use its non-zero rows for the columns of the new matrix $Q$.
  4. With your newly found $P$ and $Q$, calculate $M=P^TAQ$.
  5. Finally, calculate the pseudoinverse $A^+=QM^{-1}P^T$.

It works fine for most cases, but it doesn't work for $A=\left [ \begin{matrix}
0&1&0&-i\\0&0&1&0\\0&0&0&0\end{matrix} \right ]$
.

Is the method wrong?

Best Answer

The method works just fine for the proposed matrix so long as appropriate care is taken with conjugates. I.e.,

  1. Start by calculating $A A^*$ and row reduce it.
  2. Take the nonzero rows of the result and make their conjugates the columns of $P$.
  3. Row reduce $A^* A$ and use the conjugates of its nonzero rows as the columns of $Q$.
  4. Let $M = P^* A Q$.
  5. Then $A^+ = Q M^{-1} P^*$.

In particular, with $$ A = \begin{bmatrix} 0 & 1 & 0 & -i \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 \end{bmatrix} $$ we get $$ A A^* = \begin{bmatrix} 2 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 0 \end{bmatrix},$$ so we let $$ P = \begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix}. $$

Similarly, $$ A^* A = \begin{bmatrix} 0 & 0 & 0 & 0 \\ 0 & 1 & 0 & -i \\ 0 & 0 & 1 & 0 \\ 0 & i & 0 & 1 \end{bmatrix}, $$ so $$ Q = \begin{bmatrix} 0 & 0 \\ 1 & 0 \\ 0 & 1 \\ i & 0 \end{bmatrix}. $$ Note the $i$ in the final row, not a $-i$, because of us taking the appropriate conjugate.

Then $$ M = P^* A Q = \begin{bmatrix} 2 & 0 \\ 0 & 1 \end{bmatrix}, $$ which is invertible. If the conjugates were not taken when constructing $p$ and $q$ (really only $q$ in this particular example), the first entry of $M$ would instead be $0$, which makes it not invertible.

Finally, $$ A^+ = Q M^{-1} P^* = \begin{bmatrix} 0 & 0 & 0 \\ 1/2 & 0 & 0 \\ 0 & 1 & 0 \\ i/2 & 0 & 0 \end{bmatrix} $$ which is indeed the pseudoinverse of $A$.

Related Question