Rational Canonical Form
Invariant factors, companion blocks, and a field-independent canonical form.
The idea
Rational canonical form. Every linear operator $T$ on a finite-dimensional vector space over a field $k$ is similar to exactly one block-diagonal matrix $\operatorname{diag}\bigl(C(a_1), \ldots, C(a_m)\bigr), \qquad a_1 \mid a_2 \mid \cdots \mid a_m,$ where the $a_i$ are monic polynomials — the invariant factors of $T$ — and $C(a)$ is the companion matrix of $a$. Two operators are similar if and only if their lists of invariant factors agree.
Why ask for this rather than a diagonalization? Because eigenvalues live wherever the characteristic polynomial happens to have roots, and that may be nowhere in $k$: a rotation of the real plane has no real eigenvalue, so no diagonal and no triangular form over $\mathbb{R}$. The rational canonical form demands no roots at all. It exists over every field and is computed entirely inside $k$, which is what rational refers to here.
The companion matrix of a monic $p(x) = x^{d} + b_{d-1}x^{d-1} + \cdots + b_{0}$ is the $d \times d$ matrix carrying $1