(Solved) Solving for a variable to create a $3\times 3$ matrix with rank $2$ Consider the following $3\times 3$ matrix:
$$
\begin{pmatrix}
x&1&1\\
1&x&1\\
1&1&x\\
\end{pmatrix}
.$$
I need to solve for all the values of $x$, so that the matrix is rank(2)
I've tried row-reducing so that it reads:
$$
\begin{pmatrix}
1 & 1   & x\\  
0 & x-1 & 1-x\\  
0 & 1-x & 1-x^2\\
\end{pmatrix}
$$
then solving for $x$ so that R2 would remove all of R3, leaving me with two pivots. The problem is that it solves so that $x=1$ which makes the entire equation rank(1), and not rank(2). Any ideas or direction would be wonderful!
Found my error, thanks for all the help!
 A: Hint: use determinant to find a different value of $x$ for which the rank is $< 3$.
A: $(1\ 1\ 1)^T$ is an obvious eigenvector of eigenvalue $2-x$, $(1\ -1\ 0)^T$ and $(1\ 0\ -1)^T$ are obvious eigenvectors with eigenvalue $1-x$. So with $x=2$ we get a kernel of dimension $1$, i.e. rank $2$. With $x=1$ we get rank $1$ and in all other cases rank $3$.
A: You can just continue row-reducing:
You can add row two to row three, because then $(x-1)+(1-x)=0$. You want the matrix to have a rank less than $3$, so
$$(1-x^2)+(1-x)=-x^2-x+2=-(x-1)(x+2)=0$$
Thus, $x=1$ and $x=-2$ make the last row contain zero's. You don't want $x=1$, since then the rank is only one. Thus, you want $x=-2$ to get a matrix of rank $2$.
A: The determinant of the matrix is $0$ if and only if $x \in \{-2,1\}$, that gives us that the rank is less than 3 only for those values. For $x = -2$ it is easy to check that the rank is $2$ and for $x = 1$ that the rank is $1$.
A: As you correctly point out, $x=1$ gives rank of 1 and the choice of $x=1$ is unique. Hence, any other value of $x$ that makes the determinant equal to zero must give rank of $2$. Now
$$
\det\pmatrix{x&1&1\cr 1&x&1\cr 1&1&x\cr } = \left(x-1\right)^2\,\left(x+2\right)
$$
Thus the answer is $x=-2$. It is easy to see that $H$ given by
$$
H=\pmatrix{-2&1&1\cr 1&-2&1\cr 1&1&-2\cr }
$$
has rank 2
