Companion matrix (source code)

= Companion matrix
{title2=$C(f)$}
{wiki}

For a <monic polynomial> $f(t)=t^d+c_{d-1}t^{d-1}+\cdots+c_0$, its companion <matrix> represents multiplication by $t$ on the <quotient module> $F[t]/(f)$ in the <basis> $1,t,\ldots,t^{d-1}$. With column vectors it has ones on the subdiagonal and last column $(-c_0,\ldots,-c_{d-1})^{\mathsf T}$. For example, $C(t^2+ct+d)=\begin{pmatrix}0&-d\\1&-c\end{pmatrix}$. Transposing this <matrix> gives another common convention, so the subdiagonal convention should be specified when giving entries.