Why is the dimension of the null space of this matrix 1? Consider this problem from wikipedia:
$$A = \begin{bmatrix}
    5 & 4 & 2 & 1 \\
    0 & 1 & -1 & -1 \\
    -1 & -1 & 3 & 0 \\
    1 & 1 & -1 & 2 \end{bmatrix}$$
From the wikipedia link: "Including multiplicity, the eigenvalues of A are λ = 1, 2, 4, 4. The dimension of the eigenspace corresponding to the eigenvalue 4 is 1 (and not 2), so A is not diagonalizable"
The corresponding $A - \lambda I$ matrix for $\lambda = 4$ is
$$A - 4I = \begin{bmatrix}
    1 & 4 & 2 & 1 \\
    0 & -3 & -1 & -1 \\
    -1 & -1 & -1 & 0 \\
    1 & 1 & -1 & -2 \end{bmatrix}$$
I see that $dim(\mathbb{R}^4) - rank(A - 4I) = 4 - 3 = 1$, so the dimension of the eigenspace corresonding to $\lambda = 4$ is $1$ and the link is right. 

However, when I go and solve it manually by hand, I get:
$$(A - 4I)x = \begin{bmatrix}
    1 & 4 & 2 & 1 \\
    0 & -3 & -1 & -1 \\
    -1 & -1 & -1 & 0 \\
    1 & 1 & -1 & -2 \end{bmatrix}x = 0 \iff \begin{bmatrix}
    1 & 0 & 0 & -1 & |\space 0\\
    0 & 1 & 0 & 0 & |\space 0\\
    0 & 0 & 1 & 1 & |\space 0\\
    0 & 0 & 0 & 0 & |\space 0\end{bmatrix}$$
So the corresponding equations are:
$$x_1 - x_4 = 0\\ x_2 = 0 \\ x_3 + x_4 = 0$$
and we have:
$$x = x_4\begin{bmatrix}
    1 \\
    0 \\
    -1\\
    1\end{bmatrix} + x_2\begin{bmatrix}
    0 \\
    1 \\
    0\\
    0\end{bmatrix}$$
From this, it looks like the dimension of the eigenspace corresponding to $\lambda = 4$ is 2? Where did I make a mistake?

EDIT: I don't doubt that the rank of $A - 4I$ is 3, I'm confused as to how the row reducing method yields what seems like a 2 dimensional null space. I didn't show my work for the row reductions because it was done automatically in Matlab with "rref()" function, so I doubt Matlab made a row reduction mistake.
 A: Let's do the Gaussian elimination slowly:
\begin{align}
A - 4I =
\begin{bmatrix}
1 & 4 & 2 & 1 \\
0 & -3 & -1 & -1 \\
-1 & -1 & -1 & 0 \\
1 & 1 & -1 & -2
\end{bmatrix}
&\to
\begin{bmatrix}
1 & 4 & 2 & 1 \\
0 & -3 & -1 & -1 \\
0 & 3 & 1 & 1 \\
0 & -3 & -3 & -3
\end{bmatrix}
&&\begin{aligned} R_3&\gets R_3+R_1\\R_4&\gets R_4-R_1\end{aligned}
\\[6px]
&\to
\begin{bmatrix}
1 & 4 & 2 & 1 \\
0 & -3 & -1 & -1 \\
0 & 0 & 0 & 0 \\
0 & 0 & -2 & -2
\end{bmatrix}
&&\begin{aligned}R_3&\gets R_3=R_2 \\ R_4&\gets R_4-R_2\end{aligned}
\end{align}
So the rank is indeed $3$. Which is the same rank you get from the RREF.
If we want to get the RREF, the next step is
\begin{align}
&\to
\begin{bmatrix}
1 & 4 & 2 & 1 \\
0 & 1 & 1/3 & 1/3 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 0
\end{bmatrix}
&&\begin{aligned}R_3&\leftrightarrow R_4 \\ R_2&\gets -\tfrac{1}{3}R_2 \\ R_3&\gets -\tfrac{1}{2}R_3\end{aligned}
\\[6px]
&\to
\begin{bmatrix}
1 & 4 & 0 & -1 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 0
\end{bmatrix}
&&\begin{aligned}R_2&\gets R_2-\tfrac{1}{3}R_3 \\ R_1&\gets R_1-2R_2\end{aligned}
\\[6px]
&\to
\begin{bmatrix}
1 & 0 & 0 & -1 \\
0 & 1 & 0 & 0 \\
0 & 0 & 1 & 1 \\
0 & 0 & 0 & 0
\end{bmatrix}
&& R_1\gets R_1-4R_2
\end{align}
This matrix again has rank $3$.
A basis of the eigenspace is given by the vector
$$
\begin{bmatrix}1\\0\\-1\\1\end{bmatrix}
$$
A: It seems to me that, when solving for the $x_i$'s, you overlooked the equation $x_2=0$. That wipes out the second part of your general formula for $x$.
