Pseudoinverse Calculator

Enter a matrix of any shape to find its pseudoinverse.

Matrix A
Rows
2
Columns
3

Write rows separated by semicolons, like 1, 2; 3, 4.

Try

Result

You entered(123456)+\begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix}^{+}

A+=(−171849−19191318−29)\displaystyle A^{+} = \begin{pmatrix} -\frac{17}{18} & \frac{4}{9} \\ -\frac{1}{9} & \frac{1}{9} \\ \frac{13}{18} & -\frac{2}{9} \end{pmatrix}

Rank

2\displaystyle 2
Show the work
  1. The Moore–Penrose pseudoinverse

    The pseudoinverse is the one matrix satisfying these four conditions. It exists for every matrix and is the inverse when A is invertible; Ax = b solved with it gives the least-squares solution of smallest length.

    Using AA+A=A, A+AA+=A+, (AA+)T=AA+, (A+A)T=A+AAA^{+}A = A,\ A^{+}AA^{+} = A^{+},\ (AA^{+})^{T} = AA^{+},\ (A^{+}A)^{T} = A^{+}A

    A=(123456),rank⁡A=2A = \begin{pmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \end{pmatrix},\quad \operatorname{rank} A = 2
  2. Full row rank

    The rows are independent, so AAᵀ is invertible.

    Using A+=AT(AAT)−1A^{+} = A^{T}(AA^{T})^{-1}

    AAT=(14323277),(AAT)−1=(7754−1627−1627727)AA^{T} = \begin{pmatrix} 14 & 32 \\ 32 & 77 \end{pmatrix},\quad (AA^{T})^{-1} = \begin{pmatrix} \frac{77}{54} & -\frac{16}{27} \\ -\frac{16}{27} & \frac{7}{27} \end{pmatrix}
  3. Check: the four conditions

    All four Penrose conditions hold exactly, so this is the pseudoinverse.

    AA+A=A,A+AA+=A+,AA+=(1001) (symmetric)AA^{+}A = A,\quad A^{+}AA^{+} = A^{+},\quad AA^{+} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}\ \text{(symmetric)}
  4. Result

    The pseudoinverse.

    A+=(−171849−19191318−29)A^{+} = \begin{pmatrix} -\frac{17}{18} & \frac{4}{9} \\ -\frac{1}{9} & \frac{1}{9} \\ \frac{13}{18} & -\frac{2}{9} \end{pmatrix}

Worked examples