The characteristic polynomial of \(A\) is defined by \(pA(x) = det(A - xI_n)\).
Manual computations using \(4\)x\(4\) matrices can be very tedious. To solve this problem, I will expand along the fourth column to reduce number of \(3\)x\(3\) deterimants to be calculated. I will then expand along the third column of the resulting \(3\)x\(3\) matrix.
\[ det(A - xI_n)= \begin{vmatrix} 1 - x & 2 & 1 & 0\\ 1 & -x & 1 & 0\\ 2 & 1 & 1 - x & 0\\ 3 & 1 & 0 & 1 - x \end{vmatrix}\]
\[ = (1 - x) \begin{vmatrix} 1 - x & 2 & 1 \\ 1 & -x & 1 \\ 2 & 1 & 1 - x \end{vmatrix} \]
\[ = (1 - x) ((1 - x)\begin{vmatrix} 1 - x & 2 \\ 1 & -x \end{vmatrix} -1\begin{vmatrix} 1 - x & 2 \\ 2 & 1 \end{vmatrix} + 1\begin{vmatrix} 1 & -x \\ 2 & 1 \end{vmatrix}) \]
\[ = (1 - x)((1 - x) (-x(1 - x) - 2) -1((1 - x) - 4) + 1( 1 + 2x))\] \[ = (1 - x)((1 - x)(-x + x^2 - 2) -1 + x + 4 + 1 + 2x )\] \[ = (1 -x)(-x + x^2 - 2 + x^2 - x^3 + 2x + 4 + 3x) \]
\[ = (1 - x) (-x^3 + 2x^2 + 4x + 2 ) \] \[ = -x^3 + 2x^2 + 4x + 2 + x^4 -2x^3 - 4x^2 - 2x\]
\[ = x^4 - 3x^3 - 2x^2 + 2x + 2\]