Consider the field extension $\mathbb F_{q^m}$ over $\mathbb F_q$ and a $\mathbb F_{q^m}$ linear subspace $W \subset \mathbb F_{q^m}^n.$ Let $\sigma:\mathbb F_{q^m} \to \mathbb F_{q^m}$ be the Frobenious map given by $x \mapsto x^q.$ Also consider the action of $\sigma$ on $\mathbb F_{q^m}^n$ as $\sigma(a_1,\ldots,a_n)=(a_{1}^q,\ldots,a_{n}^q).$ Then I have to show the following thing:
$W$ is $\sigma$-invariant i.e., $\sigma(W) \subset W$ implies that $W$ has a basis consisting of elements of $\mathbb F_{q}^n.$
For any $(x_1,\ldots,x_n)\in \mathbb F_{q^m}^n,$ $Tr(x_1,\ldots,x_n)\in \mathbb F_{q}^n$. But we can't show that any basis of $W$ can be lift via the Trace map to a basis of $W$ in $\mathbb F_q^n,$ since Trace is surjective only, it is not injective. I need some idea to prove this. Many thanks.
The following trick works.
Assume that $\dim_{\Bbb{F}_{q^m}}W=k\le n$. Let $\mathcal{B}=\{w_1,w_2,\ldots,w_k\}$ be a basis of $W$ as a vector space over $\Bbb{F}_{q^n}$. Consider the $k\times n$ matrix $M$ with rows $w_1,w_2,\ldots,w_k$. Because elementary row operations on $M$ simply replace the basis $\mathcal{B}$ with another one, we can, without loss of generality, assume that $M$ is in a reduced row echelon form.
The proof is easy. Assume that the initial $1$ on row number $i$ of $M$ (aka the pivot) is on column $j_i$. So the $i$th row $w_i$ of $M$ has a $1$ at position $j_i$, and a zero at all the other pivot positions $j_1<j_2<\ldots<j_{i-1}<j_{i+1}<\ldots<j_k$. The key is that $w_i$ is the only vector in $W$ with these specific coordinates at the pivot positions. This is because those component give the coordinates of any vector of $W$ w.r.t. the basis $\mathcal{B}$.
Guess what, $\sigma(w_i)$ is also such a vector! Implying that we must have $\sigma(w_i)=w_i$! But it is well known that $\sigma(w)=w$ is equivalent to all the components of $w$ being in $\Bbb{F}_q$. QED.
The argument can be generalized to $G$-invariant subspaces $W$ of $L^n$ for any Galois extension $L/K$, $G=Gal(L/K)$. Such a subspace has a basis of vectors from $K^n$.