finding a simple basis, having the minimal and characteristic polynomial If I have a minimal polynomial ( p irred) $\ p(x)^n $, for example $ (x^2+x+1)^3 $ a characteristic polynomial $ p(x)^2 $ , how can i get a simple basis using the rational theorem? i dont understand it
 A: Well, for one thing this is impossible: you cannot have the minimal polynomial be $(x^2+x+1)^3$ and the characteristic polynomial be $(x^2+x+1)^2$. By the Cayley-Hamilton Theorem, the minimal polynomial must divide the characteristic polynomial.
Now, if you had it reversed, the minimal polynomial $(x^2+x+1)^2$ and the characteristic polynomial $(x^2+x+1)^3$, then you can argue the same way one argues about the Jordan canonical form:
The highest power of $x^2+x+1$ in the minimal polynomial tells you the size of the largest companion block in the Rational Canonical form; so the Rational canonical form will have blocks associated to $(x^2+x+1)^2$, and possibly to $(x^2+x+1)$, but none to any higher degree.
The characteristic polynomial tells you that the dimension is $6$; a block associated to $(x^2+x+1)^2$ accounts for $4$ dimensions, a block associated to $x^2+x+1$ accounts for $2$. So the Rational Canonical Form will necessarily consist of a block that is the companion matrix of $(x^2+x+1)^2$, and a block that is the companion matrix of $x^2+x+1$.
(The information in the characteristic and minimal polynomials are not always enough to uniquely determine the rational canonical form, just like they don't always uniquely determine the Jordan canonical form; we got lucky here).
So: you want something which is in $\mathrm{Ker}((T^2+T+I)^2)$ but not in $\mathrm{Ker}(T^2+T+I)$ in order to obtain the block corresponding to $(x^2+x+1)^2$. Everything is in $\mathrm{Ker}((T^2+T+I)^2)$ (because $(x^2+x+1)^2$ is the minimal polynomial); so first find $\mathrm{Ker}(T^2+T+I)$. Then take a vector $\mathbf{v}$ that is not in $\mathrm{Ker}(T^2+T+I)$, and take its $T$-cyclic basis, $\mathbf{v}, T(\mathbf{v}), T^2(\mathbf{v}), T^3(\mathbf{v})$. This gives you the first cycle. Then take some $\mathbf{w}\in \mathrm{Ker}(T^2+T+I)$ that is not in the span of the $T$-cyclic basis generated by $\mathbf{v}$, and take its $T$-cyclic basis, $\mathbf{w}, T(\mathbf{w})$. The union of the two bases is a rational canonical basis for $V$.
The process is completely analogous to how we find a Jordan canonical basis, we just use $p(T)$ instead of $T-\lambda I$, and apply $T$ to get the "next" vector instead of applying $T-\lambda I$ to get the "previous" vector (if your Jordan canonical forms have $1$s over the diagonal; if they have $1$s under the diagonal, the second part is exactly the same, only using $T$ instead of $T-\lambda I$).   
