# Generator of a subalgebra over a ring

The definition of a subalgebra in the book that I am using is: Given a subset $S ⊆ M_{n}(\mathbb{F})$={set of all nxn matrices over $\mathbb{F}$}, there is a unique smallest subalgebra of $M_{n}(\mathbb{F})$ containing S, namely, the intersection of all subalgebras containing S. This is called the subalgebra generated by S. In the case where $S = \{A_{1},A_{2},... ,A_{k}\}$ consists of a finite number k of matrices, we say that F[S] is k-generated (as an algebra)andwrite $F[S] = F[A_{1},A_{2},... ,A_{k}]$.For a singlematrix $A ∈M_{n}(\mathbb{F})$, $F[A] = \{f(A) : f ∈ F[x]\}$. In fact $\{I,A,A^2,... ,A^{m−1}\}$ is a vector space basis for F[A] if $A^m$ is the first power that is linearly dependent on the earlier powers. I am a bit confused by the term k-generated as an algebra and the algebra is spanned by the basis $\{I,A,A^2,... ,A^{m−1}\}$ as a vector space. Is there a basis that spanns the algebra as an algebra? This question might be a bit stupid but I would really appreciate an explenation, because this whole algebra/vector space thing confuses me a bit.

An algebra $A$ over a field $F$ is $k$-generated as an algebra, if there exists a subset $S\subseteq A$ such that $A=F[S]$.

$A$ is a vector space over $F$, hence possesses a basis $B\subset A$. However this basis can be large; in particuar it needs not be finite. Since every element of $A$ is a linear combination of finitely many elements of $B$, the basis $B$ also generates $A$ as an algebra over $F$, that is: $A=F[B]$. So the answer to your question is "yes": every basis spans the algebra as an algebra.

Example: take the ring $F[X]$ of polynomials in the variable $X$ with coefficients in $F$. It is an algebra over $F$. It is $1$-generated: $X$ is a generator. A basis of $F[X]$ is given by the family $(X^k : k\in\mathbb{N})$.