How to find a matrix with given eigen values Find a $3\times 3$ matrix $B$ which contains $A$ as a sub-matrix and has eigen values $0$, $1$ only
where $$A=
\begin{bmatrix} -2& -12 \\1&5 \end{bmatrix}$$
I cant find a way how to construct $B$ 
I took the eigen values to be $0$, $0$, $1$ and then took $$B =
\begin{bmatrix} -2& -12& a\\1&5 &b\\c&d&e\end{bmatrix}$$
$\implies 3+e=1\implies e=-2$
But how to take $a$, $b$, $c$, $d$?
Please help.
 A: If $A$ is a square matrix of size $n\times n$, then the block matrix
$$B=\pmatrix{O&A\\O&O}$$
of size $2n\times 2n$ has only zero as an eigenvalue. If you really want
both of zero and one as eigenvalues, take a diagonal sum with an identity matrix.
ADDED IN EDIT.
For a $3\times 3$ example, consider matrices of the form
$$\pmatrix{*&-2&-12\\0&1&5\\0&0&*}$$
A: The easiest solution is based on the fact that the determinant of an upper-diagonal matrix is the product of the diagonal elements. Since your matrix $A$  lower left element is 1, yoi have the quick solutions
$$\begin{bmatrix} 0 && -2 && -12 \\ 0 && 1 && 5 \\ 0 && 0 && 0 \end{bmatrix}, \begin{bmatrix} 1 && -2 && -12 \\ 0 && 1 && 5 \\ 0 && 0 && 0 \end{bmatrix},\begin{bmatrix} 0 && -2 && -12 \\ 0 && 1 && 5 \\ 0 && 0 && 1 \end{bmatrix}$$
Other solutions are a bit more work and make use of the simple principle: match the characteristic polynomial to $-\lambda^2(\lambda-1)$ or $-\lambda(\lambda-1)^2$ by matching the powera of $\lambda$. The solution is not unique, but for the matrix of the form
$$\begin{bmatrix} -2 && -12 && a\\ 1 && 5 && b\\ c && d && e \end{bmatrix},$$
You see that the quadratic term in $\lambda$ matches if $e=-2$ and the linear term if $ac+bd=-4$.  From there you have many solutions of which one is $c=d=1$ and $b=2$.
A: Let's start with your $$B = \begin{bmatrix} -2& -12& a\\1&5 &b\\c&d&e\end{bmatrix}$$
Let's take the eigenvalues $0,1,1$. Then $\operatorname{Tr}(B)=3+e=2 \Rightarrow e=-1$. And the characteristic polynomial must be $\lambda(\lambda -1)^2=\lambda^3-2\lambda^2+\lambda$.
$$B = \begin{bmatrix} -2& -12& a\\1&5 &b\\c&d&-1\end{bmatrix}$$
It's characteristical polynomial is:
$$\lambda^3-2\lambda^2-(ac+bd+1)\lambda - (-5ac+ad-12bc+2bd-2)$$
So:
$$\begin{cases}ac+bd+1=-1 \\ -5ac+ad-12bc+2bd-2=0\end{cases} \Rightarrow
\begin{cases}ac+bd=-2 \\ -5ac+ad-12bc+2bd=2\end{cases}$$
Let's try $c=0$ to get rid of the largest coefficients.
$$\begin{cases}bd=-2 \\ ad+2bd=2\end{cases}\Rightarrow
\begin{cases}bd=-2 \\ ad=6\end{cases}$$
Now pick for instance $a=3,b=-1, d=2$ to find:
$$B = \begin{bmatrix} -2& -12& 3\\1&5 &-1\\0&2&-1\end{bmatrix}$$
