Transition matrix and rational canonical form

1. Aug 22, 2013

Artusartos

1. The problem statement, all variables and given/known data

I want to find the transition matrix for the rational canonical form of the matrix A below.

2. Relevant equations

3. The attempt at a solution

Let $A$ be the 3x3 matrix

$\begin{bmatrix} 3 & 4 & 0 \\-1 & -3 & -2 \\ 1 & 2 & 1 \end{bmatrix}$

The characterisitc and minimal polynomials are both $(x-1)^2(x+1)$

The eigenspace for 1 is
$\{ \begin{bmatrix} 2 \\-1 \\ 1 \end{bmatrix} \}$

The eigenspace for -1 is:
$\{ \begin{bmatrix} 2 \\-2 \\ 1 \end{bmatrix} \}$

The rational canonical form $R$ is:

$\begin{bmatrix} -1 & 0 & 0 \\0 & 0 & -1 \\ 0 & 1 & 2 \end{bmatrix}$

I want to find the transition matrix $P$ such that $A=PRP^{-1}$

I thought we had to find 3 independent vectors...one from the eignspace of 1, another from the eigenspace of -1, and then any other third vector such that the three would be linearly independent. So I chose P to be:

$\begin{bmatrix} 2 & 2 & 1 \\-2 & -1 & 0 \\ 1 & 1 & 0 \end{bmatrix}$

But when I multiplied $PRP^{-1}$, I did not get $A$...I'm not sure why.

I would appreciate it if anybody could tell me where I went wrong and how I can fix it.