Clarifications of problem with parameters: the relationship between matrices and endomorphism Let $f$ be an endomorphism of $R^3$ such that $f(a,b,c)=(2b,a-b,b)$. I don't understand how I can see for which values of $k\in R$ there esist $$\begin{pmatrix}-2 & 0 & 0 \\ 0 & k & 0 \\ 0 & 0 & k+1\end{pmatrix}$$is the matrix associated to f with respect to some basis B. 
Also, if $W=<(3,-1,0),(3,1,0)>$ and $g:W \to R^3$ the restriction of $f$ to $W$ and the basis $B' = (0,1,-1),(1,0,1),(0,1,1)$ of $R^3$ how can I see if $$\begin{pmatrix}- 1/2 & 0 \\ 1 & 1 \\ 1/2 & 1\end{pmatrix}$$ is the matrix associated with $g$ for some basis $B_0$?
 A: To solve the first part of your problem, note that if the diagonal matrix is a matrix associated to $f$ then the eigenvalues of $f$ are $-2, k, k+1$ and the endomorphism is diagonalizable. 
So let us check if this is the case. With respect to the canonical basis we get the matrix for $f$: 
$$
A=\begin{pmatrix}
0 & 2 & 0 \\
1 & -1 & 0 \\
0 & 1 & 0 
\end{pmatrix}
$$ 
The characteristic polynomial is $-x(-1 - x)(-x) + 2x = -x^3 - x^2 + 2x = -x (x^2 + x - 2)= -x (x-1)(x+ 2)$. 
Thus you have the eigenvalues $0,1, -2$. Thus with $k=0$ the matrix is a matrix associated to $f$, a basis can be found by taking  eigenvectors  associated to $-2$, $0$, $1$, resp., in that order. 
If you want an actual matrix that transforms the matrix above into a diagonal one, compute the eigenvectors and put the eigenvectors into a basis as columns. One has  eigenvectors $(1,-1,1/2)$ , $(0,0,1)$ and $(2,1,1)$, for $-2, 0, 1$, resp.
So we get a matrix
$$
P=\begin{pmatrix}
1 & 0 & 2 \\
-1 & 0 & 1 \\
1/2 & 1 & 1 
\end{pmatrix}
$$ 
then $P^{-1}AP$ is diagonal. Note that $P$ is the matrix that represents the identity map, when in the domain you used the basis of eigenvectors and in the image use the canonical basis; this is because then in the domain $(1,0,0)$ will represent the first eigenvector, and multiplied by $P$ this is the first eigenvector in the canonical basis.  
