Solution (source code)

= Solution

Use <Gaussian elimination>[Gaussian elimination with partial pivoting], choosing a largest absolute entry in the uneliminated part of each pivot column. The first pivot is two in row one, with multipliers $1/2,1/2,1/5$ for rows two, three and four. The second-column candidates are then $-1,0,-2/5$, so row two stays as pivot and the remaining nonzero multiplier is $2/5$ for row four. The augmented matrix at this stage is
$$
\left(\begin{array}{rrrr|r}2&-1&4&2&3\\0&-1&3&2&1\\0&0&-3/4&-3/2&0\\0&0&3&-2&0\end{array}\right).
$$
The third pivot is three, so swap rows three and four. The final multiplier is $-1/4$, leaving last pivot $-2$. Carrying that swap through the previously stored multipliers gives
$$
P=\begin{pmatrix}1&0&0&0\\0&1&0&0\\0&0&0&1\\0&0&1&0\end{pmatrix},\qquad
L=\begin{pmatrix}1&0&0&0\\1/2&1&0&0\\1/5&2/5&1&0\\1/2&0&-1/4&1\end{pmatrix},
$$
$$
\boxed{U=\begin{pmatrix}2&-1&4&2\\0&-1&3&2\\0&0&3&-2\\0&0&0&-2\end{pmatrix},\qquad PA=LU}.
$$
The transformed right side is $(3,1,0,0)^T$. Back substitution gives $z=0$, $y=0$, $x=-1$ and $w=1$, hence $\boxed{(w,x,y,z)=(1,-1,0,0)}$.

For the <eigenvalue> claim, put $S=P^TL$. It is invertible because a <permutation matrix> and a unit <lower triangular matrix> are invertible. The factorization gives $A=SU$, so
$$
\boxed{S^{-1}AS=US=UP^TL=B}.
$$
Similar matrices have the same <characteristic polynomial> and therefore the same eigenvalues with algebraic multiplicities. This proves the claim without changing the prescribed elimination method.