Session Ready
Exercise

Addition, subtraction and multiplication of matrices

You can perform operations on matrices. Some operations put forward some requirements that need to be respected. For example, the addition or subtraction of two matrices is only possible if the matrices are of the same size or order. Elements with the same row and column number in the two matrices are added or subtracted and lead to a new matrix.

The multiplication of two matrices is only possible when they are conformable: the number of columns of the first matrix must equal the number of rows of the second matrix: $$\begin{aligned} R &= M^T \cdot N \end{aligned}$$ with \(M\) a k-by-i matrix and \(N\) a k-by-i matrix. Matrix \(M\) and \(N\) can not be multiplied since both matrices have an identical order. Taking the transpose of matrix \(M\) leads to a solution: the two matrices are conformable.

Instructions
100 XP
  • Compute the sum (operation_1) of, and the difference (operation_2) between matrices r and s.
  • Multiply (operation_3) matrices t and s. What are the dimensions