Matrix Operations

  1. Examples:

    1. $\begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \neq \begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$

    2. $\begin{bmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{bmatrix} \neq \begin{bmatrix} a & b & c \\ 0 & d & e \\ 0 & 0 & f \end{bmatrix}$

    3. $\begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 5 \end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 \\ 0 & 0 & 5 \end{bmatrix}$

    Fun Class Activity:
    1. Explain why the matrices in examples 1 and 2 above aren't equal, but the ones in example 3 are.
    2. Implement the matrix equality algorithm in Java (or any other computer language of your choice.)
    3. State whether or not the following matrices are equal, and explain your reasoning:
      $A = \begin{bmatrix} 2 & 7 & -1 & 5 \\ 3 & 4 & 8 & -3 \end{bmatrix}$
      and
      $B = \begin{bmatrix} 2 & 7 & -1 & 5 \\ 3 & 4 & 6 & -3 \end{bmatrix}$
      .