# Linear Algebra over a Ring/Free modules and matrices

Definition (free module):

Let ${\displaystyle R}$ be a ring, and let ${\displaystyle S}$ be an arbitrary set. Then the free ${\displaystyle R}$-module over ${\displaystyle S}$, denoted ${\displaystyle R\langle S\rangle }$, is defined to be the ${\displaystyle R}$-module whose elements are functions

${\displaystyle f:S\to R}$

which are zero everywhere on ${\displaystyle S}$ except on finitely many elements, together with pointwise addition and scalar multiplication.

Proposition (basis of a free module):

Let ${\displaystyle R}$ be a ring, and let ${\displaystyle S}$ be a set. Then a basis for the free ${\displaystyle R}$-module over ${\displaystyle s}$ is given by the functions

${\displaystyle f_{s}:S\to R,f(t):={\begin{cases}1&t=s\\0&{\text{otherwise}}.\end{cases}}}$

By abuse of notation, we will write ${\displaystyle s}$ instead of ${\displaystyle f_{s}}$. Hence, the above proposition implies that we may denote an element ${\displaystyle m\in R\langle S\rangle }$ as a sum

${\displaystyle m=\sum _{s\in S}a_{s}s}$,

where only finitely many ${\displaystyle a_{s}}$ are nonzero.

Proof: Let ${\displaystyle f:S\to R}$ be any function that is everywhere zero except on finitely many entries, and let ${\displaystyle s_{1},\ldots ,s_{n}=\{s\in S|f(s)\neq 0\}}$. Then we have

${\displaystyle f=\sum _{k=1}^{n}f(s_{k})s_{k}}$. ${\displaystyle \Box }$