Consider a matrix $A= \begin{pmatrix} 1 & 2 & 1\\ 3 & 6 & 1\\ 0 & 4 & 1 \end{pmatrix}$
I am applying the transformations on matrix $A$ to convert it to $U$ using the following matrices:
(The i,j in $E_{ij}$ denotes the element in matrix A which is fixed in order to transform it into $U$)
$E_{21} = \begin{pmatrix} 1 & 0 & 0\\ -3 & 1 & 0\\ 0 & 0 & 1 \end{pmatrix}$
$E_{31} = I_{3\times3}$
$P = \begin{pmatrix} 1 & 0 & 0\\ 0 & 0 & 1\\ 0 & 1 & 0 \end{pmatrix}$
Now
$U = \begin{pmatrix} 1 & 2 & 1\\ 0 & 4 & 1\\ 0 & 0 & -2 \end{pmatrix}$
If i write everything in matrix notation: $PE_{31}E_{21}A = U$
How should i convert this into $PA = LU$?