# Matrix Group Actions on Polynomials

If $P$ is a polynomial ring in $n$ indeterminates $x_1, \ldots, x_n$, over the ring $S$, then ${\operatorname{GL}}(n, S)$ acts on $P$ as follows: Let **x** denote the vector $(x_1, \ldots, x_n)$. Then the image $g$ of a polynomial $f$ of $P$ under the action of a matrix $a$ of ${\operatorname{GL}}(n, S)$ is defined by $g({\bf x}) = f({\bf x}*a)$.

## `f ^ a: RngMPolElt, GrpMatElt -> RngMPolElt`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates and coefficient ring $S$, and a matrix $a$ belonging subgroup $G$ of ${\operatorname{GL}}(n, S)$, return the image of $f$ under $a$.

## `f ^ G: RngMPolElt, GrpMat -> { RngMPolElt }`

Given a polynomial $f$ belonging to a polynomial ring having $n$ indeterminates and coefficient ring $S$, and a to a subgroup of ${\operatorname{GL}}(n, S)$, return the orbit of $f$ under $G$.

## `Example: Group Actions (ex-df3c71)`

We act on the polynomial ring in two indeterminates over the field $K = Q(\sqrt 2)$, by a cyclic subgroup of ${\operatorname{GL}}(2, K)$.

```magma
> K := QuadraticField(2);
> Aq := [ x / K.1 : x in [1, 1, -1, 1]];
> G := MatrixGroup<2, K | Aq>;
> P<x, y> := PolynomialRing(K, 2);
> f := x^2 + x * y + y^2;
> g := f^G.1;
> g;
1/2*x^2 + 3/2*y^2
> f^G;
{
   1/2*x^2 + 3/2*y^2,
   x^2 - x*y + y^2,
   x^2 + x*y + y^2,
   3/2*x^2 + 1/2*y^2
}

```
