Find matrix A or prove that it doesn't exist I came across this task on a test in Linear Algebra: 

either find a matrix that fits the description or explain why it
  doesn't exist:

a) rank $A = 1$, and eigenvalues are $1, 2$ and $4$
b) pivots are $-1$ and $-2$, and eigenvalues are $1$ and $2$.
Now, I assume that a) isn't possible because there is obviously $1$ pivot and $3$ eigenvalues, however, I'm not sure and don't have the knowledge to prove anything. 
 A: From the comment: Rank-nullity theorem says that $\mathrm{rank}(A)+\mathrm{null}(A)=n$, where $\mathrm{null}(A)=\dim\mathrm{ker}(A)$. If rank of $A$ is 1, then this implies that (the geometric but also) the algebraic multiplicity of the zero eigenvalue is $n−1$. Hence (a) is impossible.
For (b), if I got it right, assume that 
$$
A=LU
=
\begin{bmatrix}
1 & 0\\ \alpha & 1
\end{bmatrix}
\begin{bmatrix}
\color{red}{-2} & \beta \\ 0 & \color{red}{-1}
\end{bmatrix}
=\begin{bmatrix}
-2 & \beta \\ -2\alpha & \alpha\beta-1
\end{bmatrix}.
$$
The eigenvalues $\lambda_{\pm}$ of this matrix are given by
$$
2\lambda_{\pm}=\alpha\beta-3\pm\sqrt{(\alpha\beta)^2-6\alpha\beta+1}.
$$
So you would like to have them to be $1$ and $2$, that is,
$$
4 = \alpha\beta-3+\sqrt{(\alpha\beta)^2-6\alpha\beta+1},
\quad
2 = \alpha\beta-3-\sqrt{(\alpha\beta)^2-6\alpha\beta+1},
$$
which leads to the system of two simple equations
$$
\alpha\beta=6,\quad \alpha\beta(\alpha\beta-6)=0.
$$
Hence picking a nonzero $\alpha$, $\beta$ is given by $\beta=6/\alpha$, and any $A$ of the form
$$
A=\begin{bmatrix}1 & 0 \\ \alpha & 1\end{bmatrix}\begin{bmatrix}-2 & 6/\alpha \\ 0 & -1\end{bmatrix}
=\begin{bmatrix}-2 & 6/\alpha \\ -2\alpha & 5\end{bmatrix}
$$
has pivots $-2$ and $-1$ and eigenvalues $2$ and $1$.
A: Ok, here's my solution for the first problem:
The matrix has $3$ eigenvalues, which means $n>1$. Since $rankA=1<n$, not all columns are linearly independent. This means that the matrix is not invertible and $detA =0$. Now, this means that $0$ has to be an eigenvalue of the matrix, which leads us to contradiction.
