I am trying to find $f(x)$ from $F[x]$ such that $A^{-1}=f(A)$. To do so, I want to use the result of a previous question, which says that $f(A)$ is invertible if and only if $f$ and the minimal polynomial of $A$ are relatively prime.

polynomials vector space from any field F.
–
user6163Mar 28 '11 at 21:10

1

Ah. To make that clear you should probably say $f(x)\in F[x]$ and state that $F$ is the field you are working over; I thought you meant derive $f(x)$ from some polynomial $F[x]$ you are given.
–
Alex BeckerMar 28 '11 at 21:35

"Hey," is the sort of thing you yell at someone on the street to catch their attention. Have you considered some more pleasant greeting?
–
Arturo MagidinMar 29 '11 at 4:15

in general if you have the minimal polynomial $p_A(X)=X^n+a_{n-1}X^{n-1}+...+a_0$ (i.e. irreducible with $p_A(A)=0$), then $$A^{-1}=(-1/a_0)(A^{n-1}+a_{n-1}A^{n-2}+...+a_1).$$ so $A^{-1}$ is a polynomial in $A$. this comes up in linear algebra, field theory (if you want the inverse of some algebraic element $\alpha$ as a polynomial in $\alpha$), etc

Let $p\in F[x]$ be the minimal polynomial of any square matrix $A$ with entries in $F$, and let $f=p_1/p_2\in F(x)$ (with $p_i\in F[x],p_2\neq0$) be a rational fraction. Assume that $p$ is prime to $p_2$, so that $f(A)$ is well defined.

Then there is a unique $r\in F[x]$ of degree less than $\deg p$ such that $f(A)=r(A)$. Moreover $r$ is given by the following simple formula.

We can assume, by enlarging $F$, that $p$ splits over $F$ as
$$
p=\prod_{\lambda\in\Lambda}\ (x-\lambda)^{m(\lambda)}
$$
with $m(\lambda) > 0$ for all $\lambda$. Then we have
$$
r=\sum_{\lambda\in \Lambda}\ T_\lambda\left(\frac{(x-\lambda)^{m(\lambda)}}{p}T_\lambda(f)\right)\frac{p}{(x-\lambda)^{m(\lambda)}}\quad,
$$
where $T_\lambda(g)$ means "order less than $m(\lambda)$ Taylor polynomial of $g$ at $\lambda$".

Note that $T_\lambda(f)$ exists because $f$ is defined at $\lambda\in\Lambda$ thanks to the assumption that $p$ is prime to $p_2$.

I.e. exploit the the fact that the "ring of linear operators" $\rm\: F[A] \cong F[x]/f(x)\ $ where $\rm\:f(x)\:$ is the minimum polynomial of $\rm\:A\:$ over $\rm\:F\:.$ Note that this depends crucially on the fact that the coefficients commute with $\rm\:A\:,\:$ being scalars $\rm\in F\:.$

This is just the special case $\rm\ h = x\ $ of $\rm\ (f,h) = 1\ \Rightarrow\ h^{-1} $ exists $\rm\:(mod\ f)\:$, and is computable by the extended Euclidean algorithm, since $\rm\:F[x]\:$ is a Euclidean domain. This is frequently used for the purposed of rationalizing denominators in algebraic extension fields.

More generally, one can use the same "operator" techniques to compute inverses modulo "constant" coefficient differential / difference (recurrence) operators. They are all abstractly isomorphic to working in a polynomial ring residue field $\rm\:F[x]/f(x)\:.$