Pseudoinverse Calculator

Enter a matrix of any shape to find its pseudoinverse.

Matrix A
Rows
3
Columns
2

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+=(−43−1323131213−512)\displaystyle A^{+} = \begin{pmatrix} -\frac{4}{3} & -\frac{1}{3} & \frac{2}{3} \\ \frac{13}{12} & \frac{1}{3} & -\frac{5}{12} \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 column rank

    The columns are independent, so AᵀA is invertible.

    Using A+=(ATA)−1ATA^{+} = (A^{T}A)^{-1}A^{T}

    ATA=(35444456),(ATA)−1=(73−116−1163524)A^{T}A = \begin{pmatrix} 35 & 44 \\ 44 & 56 \end{pmatrix},\quad (A^{T}A)^{-1} = \begin{pmatrix} \frac{7}{3} & -\frac{11}{6} \\ -\frac{11}{6} & \frac{35}{24} \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+=(5613−16131313−161356) (symmetric)AA^{+}A = A,\quad A^{+}AA^{+} = A^{+},\quad AA^{+} = \begin{pmatrix} \frac{5}{6} & \frac{1}{3} & -\frac{1}{6} \\ \frac{1}{3} & \frac{1}{3} & \frac{1}{3} \\ -\frac{1}{6} & \frac{1}{3} & \frac{5}{6} \end{pmatrix}\ \text{(symmetric)}
  4. Result

    The pseudoinverse.

    A+=(−43−1323131213−512)A^{+} = \begin{pmatrix} -\frac{4}{3} & -\frac{1}{3} & \frac{2}{3} \\ \frac{13}{12} & \frac{1}{3} & -\frac{5}{12} \end{pmatrix}

Worked examples