Lemma. Associativity and unit laws of matrix products [00J3]
- January 17, 2024
- Jon Sterling, with contributions from Marcelo Fiore
The product of matrices is associative and has the identity matrix as neutral element.
Proof.
- January 17, 2024
- Jon Sterling
For associativity, fix matrices L:\mathrm {Mat}_{S}{\mathopen {}\left (k,l\right )\mathclose {}}, M:\mathrm {Mat}_{S}{\mathopen {}\left (l,m\right )\mathclose {}} and N:\mathrm {Mat}_{S}{\mathopen {}\left (m,n\right )\mathclose {}} to check that {\mathopen {}\left (N\otimes M\right )\mathclose {}}\otimes L = N\otimes {\mathopen {}\left (M\otimes L\right )\mathclose {}}. Below we use the associativity of multiplication, commutativity of addition, and distributivity of multiplication over addition in the semiring S:
\begin {aligned} {\mathopen {}\left ({\mathopen {}\left (N\otimes M\right )\mathclose {}}\otimes L\right )\mathclose {}}_{a,d} &= \bigoplus _{b:{\mathopen {}\left [l\right ]\mathclose {}}} {\mathopen {}\left (N\otimes M\right )\mathclose {}}_{b,d}\odot L_{a,b} \\ &= \bigoplus _{b:{\mathopen {}\left [l\right ]\mathclose {}}} {\mathopen {}\left ( \bigoplus _{c:{\mathopen {}\left [m\right ]\mathclose {}}} N_{c,d}\odot M_{b,c} \right )\mathclose {}} \odot L_{a,b} \\ &= \bigoplus _{b:{\mathopen {}\left [l\right ]\mathclose {}}} \bigoplus _{c: {\mathopen {}\left [m\right ]\mathclose {}}} N_{c,d}\odot M_{b,c}\odot L_{a,b} \\ &= \bigoplus _{c: {\mathopen {}\left [m\right ]\mathclose {}}} N_{c,d}\odot \bigoplus _{b:{\mathopen {}\left [l\right ]\mathclose {}}} M_{b,c}\odot L_{a,b} \\ &= \bigoplus _{c: {\mathopen {}\left [m\right ]\mathclose {}}} N_{c,d}\odot {\mathopen {}\left (M\otimes L\right )\mathclose {}}_{a,c} \\ &= {\mathopen {}\left (N\otimes {\mathopen {}\left (M\otimes L\right )\mathclose {}}\right )\mathclose {}}_{a,d} \end {aligned}For one unit law, we fix M:\mathrm {Mat}_{S}{\mathopen {}\left (m,n\right )\mathclose {}} and recall the definition of the identity matrix to check that M\otimes I^m = M.
\begin {aligned} {\mathopen {}\left (M\otimes I^m\right )\mathclose {}}_{i,j} &= \bigoplus _{k: {\mathopen {}\left [m\right ]\mathclose {}}} M_{k, j} \odot I^m_{i,k} \end {aligned}Unfolding the definition of I^m_{i,j} as given in Definition [00IT], we see that the iterated sum above expands to m-1 copies of 0\odot M_{k,j} for various k \not = i and one copy of 1\odot M_{i,j}. Thus, we conclude that M\otimes I^m_{i,j} = M_{i,j} using the absorption and unit laws for multiplication as well as the unit laws for addition in S.
The other unit law follows in an analogous way.