Rational Canonical form from given minimal and characteristic polynomial $A$ is a $4\times 4$ matrix over $F$ with characteristic polynomial $(x-1)^4$ and minimal polynomial $(x-1)^2$. What is the rational canonical form of $A$?
My answer was the following: it is one of the following:
$$
\begin{bmatrix}
0 & -1 &  & \\
1 & 2 &  & \\
 &  & 1 & \\
& & & 1
\end{bmatrix} or \begin{bmatrix}
0 & -1 &  & \\
1 & 2 &  & \\
 &  & 0 & -1\\
& & 1 & 2
\end{bmatrix}.
$$
While our teacher finally reached at only second form. I am not satisfied with that answer. 
My question is that whether the first matrix here can also be a rational form? 
In general, to write rational canonical form of a matrix, I will proceed as follows: let $$m_A(x)=(x-a_1)^{k_1}(x-a_2)^{k_2}\cdots.$$
For each factor $(x-a_i)^{k_i}$ write one block diagonal companion matrix. 
If this fills up the matrix size (i.e. if $m_A(x)$ equals characteristic polynomial, then this is required form. 
Otherwise, fill up remaining parts (diagonal blocks) by writing companion matrix of factors $(x-a_i)^{l_i}$ where $l_i \leq k_i$. 
Is this correct way?
 A: Yes, you have two possible rational canonical forms given the information you have. Both the matrices you wrote have minimal polynomial $(x-1)^2$ and characteristic polynomial $(x-1)^4$.
However, what you wrote regarding finding the rational canonical form is not correct. In general, you cannot determine the rational canonical form of a matrix only from the minimal and characteristic polynomials as your example clearly shows. You need to know the whole set of invariant factors of which the minimal polynomial is only one of them. 
To justify that $A$ has one of the two possible canonical forms above, let $a_1 \, | \, a_2 \, | \, \ldots \, | \, a_k$ denote the invariant factors of $A$. The highest invariant factor is always the minimal polynomial so $a_k = (x-1)^2$. The characteristic product of the matrix is the product of the invariant factors so we have a priori two options:
$$ a_1(x) = (x-1), a_2(x) = (x-1), a_3(x) = (x-1)^2, \\
a_1(x) = (x-1)^2, a_2(x) = (x-1)^2. $$
The first option corresponds to your first matrix and the second to your second option. For more details, see section 12.2 in Dummit and Foote's Abstrat Algebra.
