<s>[INST] Find non-singular matrices P and Q such that PAQ is in the normal form for the matrix A. $A= \left[ \begin{array}{ccc}
1 & 2 & 3 & -2 \\
2 & -2 & 1 & 3 \\
3 & 0 & 4 & 1 \end{array} \right]$
$A=IAI$
$\left[ \begin{array}{ccc}
1 & 2 & 3 & -2 \\
2 & -2 & 1 & 3 \\
3 & 0 & 4 & 1 \end{array} \right]$ = $\left[ \begin{array}{ccc}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \end{array} \right] A \left[ \begin{array}{ccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \end{array} \right]$
 [/INST] If I understand what you mean by normal form here, we would do the following series of operations ($R$ is row, $C$ is Column, and note the row operations are duplicated on the RHS $3x3$ and Column Operations are duplicated on the $4x4$, while performing the operations listed below on the LHS, that is, the matrix $A$ itself):


*

*$R2: R2 - 2R1$

*$R3: R3 - 3R1$

*$R3: R3 - R2$

*$C4: C4 + C2$

*$C3: C3 + 5 C4$

*$C2: C2 + 6C4$

*$C2: C2 - 2C1$

*$C3: C3 - 3C1$

*$ C2 \leftrightarrow C4$ (that is, swap these two columns)


So, we start with:
$\left[ \begin{array}{ccc}
1 & 2 & 3 & -2 \\
2 & -2 & 1 & 3 \\
3 & 0 & 4 & 1 \end{array} \right]$ = $\left[ \begin{array}{ccc}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1 \end{array} \right] A \left[ \begin{array}{ccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \end{array} \right]$
and after performing the operations outlined above, end up with:
$\left[ \begin{array}{ccc}
1 & 0 & 0 & 0 \\
0 & 1 & 0 & 0\\
0 & 0 & 0 & 0 \end{array} \right]$ = $\left[ \begin{array}{ccc}
1 & 0 & 0 \\
-2 & 1 & 0 \\
-1 & -1 & 1 \end{array} \right] A \left[ \begin{array}{ccc}
1 & 0 & -3 & -2 \\
0 & 1 & 5 & 7 \\
0 & 0 & 1 & 0 \\
0 & 1 & 5 & 6 \end{array} \right]$
Some observations:


*

*$P$ and $Q$ are nonsingular (full rank) matrices

*$P$ and $Q$ are NOT unique. A different sequence of operations to obtain the normal form gives different $P$ and $Q$ (you should verify this by finding a different sequence).

*$A = P^{-1} \cdot \begin{bmatrix}I_r & 0\\0 & 0\end{bmatrix} \cdot Q^{-1}$, where $I_r$ is the $I_2$ matrix listed in the final form of the LHS reductions above.

*If $A$ is a nonsingular matrix, $A = P^{-1}Q^{-1}$ (In this example, rank $A = 2$, so this does not apply).

</s>