[Math] Find invertible matrices $P,Q$ such that $A^0=PAQ$

linear algebramatricesmatrix equations

Given the matrix $A$ over the field $\Bbb{R}$
$$A=\begin{bmatrix}
1 & 2 & -1 \\
1 & 3 & -1 \\
-1 & -1 & 1
\end{bmatrix}$$

Find the canonical matrix $A^0$ of the matrix $A$ and invertible matrices $P$ and $Q$ such that $A^0=PAQ$

This was given a part of a first semester linear algebra exam question, I think I found the canonical matrix or the "Reduced row echelon form"(as google suggest not sure which one is common)
$$A^0=\begin{bmatrix}
1 & 0 & -1 \\
0 & 1 & 0 \\
0 & 0 & 0
\end{bmatrix}$$

However I don't have any ideas how to get $P,Q$.

Best Answer

Since the question asks for matrices that are to be on both left and right of $A$, I’m going to guess that the “canonical form” that the problem asks for is $$\left[\begin{array}{c|c}I_r&0\\\hline0&0\end{array}\right],$$ where $r=\operatorname{rank}A$. The matrices $P$ and $Q$ that achieve this form aren’t unique, but a suitable pair can be found via row- and column-reduction of an augmented matrix.

Start by augmenting $A$ with $I_3$ and row-reducing: $$\left[\begin{array}{ccc|cc}1&2&-1 & 1&0&0 \\ 1&3&-1 & 0&1&0 \\ -1&-1&1 & 0&0&1 \end{array}\right] \to \left[\begin{array}{ccc|cc} 1&0&-1 & 3&-2&0 \\ 0&1&0 & -1&1&0 \\ 0&0&0 & 2&-1&1 \end{array}\right].$$ The right side of this augmented matrix is $P$. Now, you could take the left side of the result, augment its transpose, row-reduce again and then take the transpose of the right-hand side as $Q$, but there’s a simpler way to construct $Q$. The pivot columns will remain unchanged, so the first $\operatorname{rank}A$ columns of $Q$ are exactly those pivot columns. To zero out the third column, you’re going to subtract suitable multiples of the pivot columns from it, so the corresponding column of $Q$ will be the negation of that column with a $1$ on the diagonal. (This should remind you of finding a basis for the null space of $A$, which is no coincidence.) Using that method, we get $$Q = \begin{bmatrix}1&0&1 \\ 0&1&0 \\ 0&0&1 \end{bmatrix}.$$ I’ll leave it to you to verify that $PAQ$ has the form at top.