# Need a hint? Click here
# To solve this exercise, you will need 3 for
loops: one to go over $n$ rows of the output matrix, one to go over $k$ columns, and one to add up $m$ products that form each element of the output:
#
#
# for i in range(n):
# for j in range(k):
# sum = 0
# for t in range(m):
# sum = sum + ...
# c[i][j] = sum
#
#
# A video explanation can be found here.
#
# In[ ]:
@exercise
def matrix_mult(a : Matrix, b : Matrix) -> Matrix:
return ...
# *Can't come up with a solution? See the explained solution in the [Linear Algebra Workbook](./Workbook_LinearAlgebra.ipynb#Exercise-3:-Matrix-multiplication.).*
# ## Inverse Matrices
#
# A square $n \times n$ matrix $A$ is **invertible** if it has an inverse $n \times n$ matrix $A^{-1}$ with the following property:
#
# $$AA^{-1} = A^{-1}A = I_n$$
#
# In other words, $A^{-1}$ acts as the **multiplicative inverse** of $A$.
#
# Another, equivalent definition highlights what makes this an interesting property. For any matrices $B$ and $C$ of compatible sizes:
#
# $$A^{-1}(AB) = A(A^{-1}B) = B$$
# $$(CA)A^{-1} = (CA^{-1})A = C$$
#
# A square matrix has a property called the **determinant**, with the determinant of matrix $A$ being written as $|A|$. A matrix is invertible if and only if its determinant isn't equal to $0$.
#
# For a $2 \times 2$ matrix $A$, the determinant is defined as $|A| = (A_{0,0} \cdot A_{1,1}) - (A_{0,1} \cdot A_{1,0})$.
#
# For larger matrices, the determinant is defined through determinants of sub-matrices. You can learn more from [Wikipedia](https://en.wikipedia.org/wiki/Determinant) or from [Wolfram MathWorld](http://mathworld.wolfram.com/Determinant.html).
# ###