## Matrices

Let $m$ and $n$ be positive integers. Let $R$ be a commutative ring.

• An $m×n$ matrix with entries in $R$ is a table of elements of $R$ with $m$ rows and $n$ columns.
• A column vector of length $n$ is an $n×1$ matrix.
• A row vector of length $n$ is an $1×n$ matrix.
• The $\left(i,j\right)$ entry of a matrix $a$ is the element ${a}_{ij}$ of $R$ in row $i$ and column $j$ of $a$.  $a=\left(\begin{array}{cccc}{a}_{11}& {a}_{12}& \cdots & {a}_{1n}\\ {a}_{21}& {a}_{22}& \cdots & {a}_{2n}\\ ⋮& ⋮& \ddots & ⋮\\ {a}_{m1}& {a}_{m2}& \cdots & {a}_{mn}\end{array}\right)=\left({a}_{ij}\right)$

Let ${M}_{m×n}\left(R\right)$ be the set of $m×n$ matrices with entries in $R$.

• The sum of $m×n$ matrices $a=\left({a}_{rs}\right)$ and $b=\left({b}_{rs}\right)$ is the $m×n$ matrix $a+b$ given by  ${\left(a+b\right)}_{ij}={a}_{ij}+{b}_{ij},\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,m,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,n.$
• Scalar multiplication of an element $r\in R$ with a matrix $a$ is the matrix $ra$ given by  ${\left(ra\right)}_{ij}=r{a}_{ij},\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,m,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,n.$
• The product of a $m×n$ matrix $a=\left({a}_{ij}\right)$ and a $n×p$ matrix $b=\left({b}_{k\ell }\right)$ is the $m×p$ matrix $ab$ given by  ${\left(ab\right)}_{ij}=\sum _{k=1}^{n}{a}_{ik}{b}_{k\ell },\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,m,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,p.$
• The transpose of a $m×n$ matrix $a$ is the $n×m$ matrix ${a}^{t}$ given by  ${\left({a}^{t}\right)}_{ij}={a}_{ji},\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,n,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,m.$

Example.

 $\left(\begin{array}{cc}2& 3\\ 1& 2\end{array}\right)+\left(\begin{array}{cc}5& 2\\ 1& 6\end{array}\right)=\left(\begin{array}{cc}7& 5\\ 2& 8\end{array}\right),\phantom{\rule{2em}{0ex}}\left(\begin{array}{cc}2& 3\\ 1& 2\end{array}\right)\left(\begin{array}{cc}5& 2\\ 1& 6\end{array}\right)=\left(\begin{array}{cc}13& 22\\ 7& 14\end{array}\right)\phantom{\rule{2em}{0ex}}\text{and}\phantom{\rule{2em}{0ex}}{\left(\begin{array}{cc}2& 3\\ 1& 2\end{array}\right)}^{t}=\left(\begin{array}{cc}2& 1\\ 3& 2\end{array}\right).$

HW: Show that if $a,b,c$ are $n×n$ matrices then $\left(ab\right)c=a\left(bc\right)$, $a\left(b+c\right)=ab+ac$ and $\left(b+c\right)a=ba+ca$.

HW: Give an example of $n×n$ matrices $a$ and $b$ such that $ab\ne ba$.

Let $S$ be a set.

• The Kronecker delta is given by  ${\delta }_{ab}=\left\{\begin{array}{ll}1,& \text{if}\phantom{\rule{0.5em}{0ex}}a,b\in S\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}a=b,\\ 0,& \text{otherwise.}\end{array}$

Let $m$ and $n$ be positive integers and let $R$ be a ring.
(a)   The set
 ${M}_{m×n}\left(R\right)=\left\{m×n\phantom{\rule{0.5em}{0ex}}\text{matrices with entries in}\phantom{\rule{0.5em}{0ex}}R\right\},$
with operation addition is an abelian group with zero element $0\in {M}_{m×n}\left(R\right)$ given by
 ${0}_{ij}=0\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,m,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,n.$
(b)   The set ${M}_{m×n}\left(R\right)$ with operations addition and scalar multiplication is an $R$-module.
(c)   The set ${M}_{n}\left(R\right)={M}_{n×n}\left(R\right)$ with operations addition and product is a ring with identity $1\in {M}_{n}\left(R\right)$ given by
 ${1}_{ij}={\delta }_{ij}\phantom{\rule{2em}{0ex}}\text{for}\phantom{\rule{0.5em}{0ex}}i=1,2,\dots ,n,\phantom{\rule{0.5em}{0ex}}\text{and}\phantom{\rule{0.5em}{0ex}}j=1,2,\dots ,n.$

Proof.

(a)
 To show: $A+B=B+A$ To show: ${\left(A+B\right)}_{ij}={\left(B+A\right)}_{ij}$ $(A+B)ij = Aij+Bij = Bij+Aij, since 𝔽 has commutative addition = (B+A)ij.$
(b)
 To show: $\left(A+B\right)+C=A+\left(B+C\right)$ To show: ${\left(\left(A+B\right)+C\right)}_{ij}={\left(A+\left(B+C\right)\right)}_{ij}$ $(A+B)+C= A+(B+C) = (A+B)ij+Cij =(Aij+Bij) +Cij = Aij+ (Bij+Cij), since + is associative in 𝔽, = Aij+ (B+C)ij= (A+(B+C))ij.$
(c) Define the zero matrix $0$ by ${0}_{ij}=0\text{.}$
To show: (ca) $0+A=A$
(cb) $A+0=A$
(ca)
 To show: ${\left(0+A\right)}_{ij}={A}_{ij}$ $(0+A)ij = 0ij+Aij =0+Aij= Aij.$
(cb)
 To show: ${\left(A+0\right)}_{ij}={A}_{ij}$ $(A+0)ij = Aij+0ij =Aij+0= Aij.$
(d)
 To show: $\left(AB\right)C=A\left(BC\right)$ To show: ${\left(\left(AB\right)C\right)}_{ij}={\left(A\left(BC\right)\right)}_{ij}$ $((AB)C)ij = ∑k=1n (AB)ik Ckj = ∑k=1n ∑ℓ=1m (AiℓBℓk) Ckj = ∑ℓ=1m ∑k=1n (AiℓBℓk) Ckj = ∑ℓ=1m ∑k=1n Aiℓ (BℓkCkj) = ∑ℓ=1m Aiℓ (BC)ℓj.$
(e)
To show: (ea) $\left(A+B\right)·C=AC+BC$
(eb) $C\left(A+B\right)=CA+CB$
(ea)
 To show: ${\left(\left(A+B\right)C\right)}_{ij}={\left(AC+BC\right)}_{ij}$ $((A+B)C)ij = ∑k=1n (A+B)ik Ckj= ∑k=1n (AikBik) Ckj = ∑k=1n ( AikCkj+ BikCkj ) ,by the distributive property in 𝔽 = ( ∑k=1n Aik Ckj ) + ( ∑k=1n Bik Ckj ) = (AC)ij+ (BC)ij = (AC+BC)ij.$
(eb)
 To show: ${\left(C\left(A+B\right)\right)}_{ij}={\left(CA+CB\right)}_{ij}$ $(C(A+B))ij = ∑k=1m Cik (A+B)kj =∑k=1m Cik (Akj+Bkj) = ∑k=1m ( CikAkj+ CikBkj ) ,by the distributive property in 𝔽, = ( ∑k=1m CikAkj ) + ( ∑k=1m CikBkj ) = (CA)ij+ (CB)ij = (CA+CB)ij.$
(f) Define the identity matrix $1$ by $1ij= { 1, if i=j, 0, if i≠j.$
To show: (fa) $1·A=A$
(fb) $A·1=A$
(fa)
 To show: ${\left(1·A\right)}_{ij}={A}_{ij}$ $(1·A)ij = ∑k=1n 1ik Akj =1ii Aij+ ∑k≠i 1ik Akj = 1·Aij+0 =Aij.$
(fb)
 To show: ${\left(A·1\right)}_{ij}={A}_{ij}$ $(A·1)ij = ∑k=1m Aik1kj =Aij1jj +∑k≠j Aik 1kj = Aij·1+0 =Aij.$
(g) Define the matrix $-A$ by $(-A)ij= -Aij.$
To show: (ga) $A+\left(-A\right)=0$
(gb) $\left(-A\right)+A=0$
(ga)
 To show: ${\left(A+\left(-A\right)\right)}_{ij}={0}_{ij}$ $(A+(-A))ij = Aij+ (-A)ij = Aij+ (-Aij) = 0=0ij$
(gb)
 To show: ${\left(\left(-A\right)+A\right)}_{ij}={0}_{ij}$ $((-A)+A)ij= (-A)ij+ Aij=-Aij +Aij=0=0ij.$

$\square$

HW: Show that ${M}_{n×1}\left(R\right)\simeq {R}^{n}$ as $R$-modules.

Example.

(a)   The set of triangular matrices and the set of diagonal matrices are subrings of ${M}_{n}\left(R\right)$.
(b)   The ideals of ${M}_{n}\left(R\right)$ are ${M}_{n}\left(I\right)$, where $I$ is an ideal of $R$.

Let $a$ be an $n×n$ matrix with entries ${a}_{ij}$.

• The trace of $a$ is  $\mathrm{tr}\left(a\right)=\sum _{i=1}^{n}{a}_{ii}$.
• The determinant of $a$ is  $\mathrm{det}\left(a\right)=\sum _{w\in {S}_{n}}\mathrm{det}\left(w\right){a}_{1w\left(1\right)}{a}_{2w\left(2\right)}\cdots {a}_{nw\left(n\right)}$

Let $𝔽$ be a field and let $n\in {ℤ}_{>0}$.
(a)   Up to constant multiples, $\mathrm{tr}:{M}_{n}\left(𝔽\right)\to 𝔽$ is the unique function such that
(a1)   If $c\in 𝔽$ and $a,b\in {M}_{n}\left(𝔽\right)$ then
 $\mathrm{tr}\left(a+b\right)=\mathrm{tr}\left(a\right)+\mathrm{tr}\left(b\right)\phantom{\rule{2em}{0ex}}\text{and}\phantom{\rule{2em}{0ex}}\mathrm{tr}\left(ca\right)=c\mathrm{tr}\left(a\right).$
(a2)   If $a,b\in {M}_{n}\left(𝔽\right)then$
 $\mathrm{tr}\left(ab\right)=\mathrm{tr}\left(ba\right)$.
(b)   Identify ${M}_{n}\left(𝔽\right)$ with the $𝔽$-module $\underset{\underset{n\phantom{\rule{0.5em}{0ex}}\text{times}}{⏟}}{{𝔽}^{n}×\cdots ×{𝔽}^{n}}$,
 $\begin{array}{ccc}{M}_{n}\left(𝔽\right)& \stackrel{\sim }{⟶}& \underset{\underset{n\phantom{\rule{0.5em}{0ex}}\text{times}}{⏟}}{{𝔽}^{n}×\cdots ×{𝔽}^{n}}\\ a& ⟼& \left({a}_{1}|{a}_{2}|\cdots |{a}_{n}\right)\end{array}$,      where ${a}_{i}$ are the columns of $a$.
The function $\mathrm{det}:{M}_{n}\left(𝔽\right)\to 𝔽$ is the unique function such that
(b1)   (columnwise linear) If $i\in \left\{1,2,\dots ,n\right\}$ and $c\in 𝔽$ then
 $\mathrm{det}\left({a}_{1}|\cdots |{a}_{i}+{b}_{i}|\cdots |{a}_{n}\right)=\mathrm{det}\left({a}_{1}|\cdots |{a}_{i}|\cdots |{a}_{n}\right)+\mathrm{det}\left({a}_{1}|\cdots |{b}_{i}|\cdots |{a}_{n}\right)$
and
 $\mathrm{det}\left({a}_{1}|\cdots |c{a}_{i}|\cdots |{a}_{n}\right)=c\mathrm{det}\left({a}_{1}|\cdots |{a}_{i}|\cdots |{a}_{n}\right)$,
(b2) If $i\in \left\{1,2,\dots ,n-1\right\}$ then
 $\mathrm{det}\left({a}_{1}|\cdots |{a}_{i}|{a}_{i+1}|\cdots |{a}_{n}\right)=-\mathrm{det}\left({a}_{1}|\cdots |{a}_{i+1}|{a}_{i}|\cdots |{a}_{n}\right)$,
(b3)   if $a,b\in {M}_{n}\left(𝔽\right)then$
 $\mathrm{det}\left(ab\right)=\mathrm{det}\left(a\right)\mathrm{det}\left(b\right)$.

## Notes and References

A matrix is just a table of numbers, and hence matrices appear everywhere. These notes are taken from notes of Arun Ram from 1999. A nice solid reference is [HP].

## References

[HP] W.V.D. Hodge and D. Pedoe, Methods of algebraic geometry. Vol. I. Reprint of the 1947 original. Cambridge Mathematical Library. Cambridge University Press, Cambridge, 1994. viii+440 pp. ISBN: 0-521-46900-7, 14-01 (01A75) Methods of algebraic geometry I, Cambrdige University Press, MR1288305.