Calculating the centralizer of a matrix in a general linear group. Let $G = GL(3,\mathbb{R})$ be the general linear group over the reals , of order $3$ , and let 
$A\in G$ be :
$$
A=\begin{pmatrix}
 -1 & 0 & 0 \\\
 0 & 1  & 0 \\\
 0 &  0 & 2
\end{pmatrix}.
$$
I'm having a hard time calculating $C(A)$ , I've deduced the following :
$$C(A)=\langle A \rangle \cup \{ kI | k \in R , k \neq 0 \}$$
Is there any other elements in $C(A)$? and how do I go about solving such a question?
Note : $\langle A \rangle$ is the cyclic sub-group of $G$, generated by $A$
 A: If $B$ commutes with $A$, it leaves the eigenspaces of $A$ invariant. In this case, these are the one-dimensional subspaces generated by the vectors of the canonical basis $\{e_i\;;\; i=1,2,3\}$. So $Be_i=\lambda_ie_i$ for $i=1,2,3$. That is $B$ is diagonal. The converse is clear. 
Conclusion: the commutant of $A$ in $M_3(\mathbb{R})$ is the subalgebra of diagonal matrices. And the centralizer of $A$ in $GL(3,\mathbb{R})$ is therefore the subgroup of invertible diagonal matrices.
Note: this observation generalizes to any diagonal matrix with pairwise distinct diagonal elements. It generalizes also to a any (diagonalizable) matrix with pairwise distinct eigenvalues: the commutant is then the subalgebra of matrices which are simultaneuously diagonalizable with $A$. As soon as the eigenspaces become bigger, the commutant loses its commutativity.
Edit: for more "abstract-algebra", I will add that the commutant of $A$ is, in this case, $\mathbb{R}[A]=\{p(A)\;;\; p\in\mathbb{R}[X]\}$ the algebra of all polynomial evaluations on $A$. It follows from the above after you have observed that, by interpolation, for any $\lambda_1,\lambda_2,\lambda_3$, there exists a polynomial of degree $2$ $p(X)$ such that $p(-1)=\lambda_1, p(1)=\lambda_2, p(2)=\lambda_3$. In particular $\mathbb{R}[A]=\mathbb{R_2[A]}$ is three-dimensional. Ththe latter can be recovered directly from the minimal polynomial.
So the centralizer is $\mathbb{R}[A]^*=\{B=p(A)\;;\; \det B\neq 0\}=\{B=p(A)\;;\; p(-1)p(1)p(2)\neq 0\}$. It is interesting to think about this result in view of the functional calculus and the spectral mapping theorem.
A: A matrix $B$ commutes with $A$ iff $AB=BA$ iff $B=ABA^{-1}$; fill the entries of $B$ with unknowns, write out this equation, and then find an equivalent system of relations for the unknowns:
$$\begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} = \begin{pmatrix}-1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{pmatrix} \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} \begin{pmatrix}-1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 2 \end{pmatrix}^{-1}=\begin{pmatrix}a & -b & -c/2 \\ -d & e & f/2 \\ -2g & 2h & i\end{pmatrix} $$
$$\implies b,c,d,f,g,h=0,~\text{ no restrictions on }a,e,i.$$
Hence the centralizer is precisely the subgroup of invertible diagonal matrices.
