Assume $A$ is a matrix of order $n$. We know that the characteristic polynomial of matrix $A$ is obtained as follows $$ P(x)=\det (A-x\,I)\, . $$
Where $I$ is an identity matrix of order $n$. What about inverse? For a given polynomial like $P(x)$, Is there an efficient method to find a matrix like $A$ where the characteristic polynomial of matrix $A$ be the polynomial $P(x)$.
I know that the number of matrices that have the same characteristic polynomials are uncountable. Because, If we assume that all entries of matrix $A$ be indeterminates then the number of variables in the equation $$ \det (A-x\,I)=P(x) $$ are more than equations. Thanks for any suggestion.
Edit:
My motivation of this question is that if $A$ be a non-derogatory matrix (in other words, its minimal and characteristic polynomials coincide) then Frobenius normal form of matrix $A$ is a companion matrix. Now, If we have a companion matrix like $C$, how to find a matrix like $A$, such that the companion matrix $C$ be the Frobenius normal form of matrix $A$.
The user @Jack answered the obviously solution of my original question and because of this I edit my question.
Yes. What you are looking for is the companion matrix.