girgit.org

Matrices

Adding matrices and multiplying by a number

The big ideaTo add two matrices of the same order, add the entries in matching places; to multiply a matrix by a number, multiply every entry by that number; and these two operations follow the same rules as ordinary numbers.

In simple words

Two weeks of sales sit in two grids of the same shape. To get the total, add box to box: first box plus first box, second plus second, and so on. If every sale doubles, double every box. Grids of different shapes cannot be added, because some boxes would have no partner.

Adding matrices

The kirana shop's two branches (rows) sell rice, dal and sugar (columns). Packets sold in week 1 and week 2 are

\[ A = \begin{bmatrix} 12 & 8 & 15 \\ 10 & 14 & 9 \end{bmatrix}, \qquad B = \begin{bmatrix} 9 & 11 & 13 \\ 16 & 7 & 12 \end{bmatrix}. \]

The total for the two weeks adds each place to its partner:

\[ A + B = \begin{bmatrix} 12 + 9 & 8 + 11 & 15 + 13 \\ 10 + 16 & 14 + 7 & 9 + 12 \end{bmatrix} = \begin{bmatrix} 21 & 19 & 28 \\ 26 & 21 & 21 \end{bmatrix}. \]

In general, if \( A = [a_{ij}] \) and \( B = [b_{ij}] \) are both m × n, their sum is the m × n matrix \( C = [c_{ij}] \) with \( c_{ij} = a_{ij} + b_{ij} \). If A and B have different orders, A + B is not defined: you cannot add a 2 × 3 matrix to a 3 × 2 one. Since adding two m × n matrices gives another m × n matrix, addition is a binary operation on the set of m × n matrices.

Multiplying by a number

In the festival week, the first week's sales triple. The new matrix is

\[ 3A = \begin{bmatrix} 36 & 24 & 45 \\ 30 & 42 & 27 \end{bmatrix}. \]

A plain number like 3 is called a scalar (it only "scales" things). Scalar multiplication: for \( A = [a_{ij}]_{m \times n} \) and a scalar k, kA is the m × n matrix whose (i, j)th entry is \( k a_{ij} \). Every entry is multiplied, not just one row.

Negative and difference

  • The negative of A is \( -A = (-1)A \): flip the sign of every entry.
  • The difference of two matrices of the same order is \( A - B = A + (-1)B \), so \( d_{ij} = a_{ij} - b_{ij} \).

The change in sales from week 1 to week 2 is

\[ B - A = \begin{bmatrix} -3 & 3 & -2 \\ 6 & -7 & 3 \end{bmatrix}. \]

A negative entry is a fall: the second branch sold 7 fewer packets of dal.

Try it: the triangle from the first page is a matrix too. Scale it by k, then add a matrix that shifts every corner, and watch what each operation does to the picture.

The rules they follow

Each rule holds because it holds for each pair of numbers in matching places. For matrices A, B, C of the same order m × n and scalars k, l:

RuleStatement
Commutative lawA + B = B + A
Associative law(A + B) + C = A + (B + C)
Additive identityA + O = O + A = A, where O is the m × n zero matrix
Additive inverseA + (−A) = (−A) + A = O
Scalar over a sum of matricesk(A + B) = kA + kB
Sum of scalars over a matrix(k + l)A = kA + lA

For example, why is (k + l)A = kA + lA? The (i, j)th entry on the left is \( (k + l)a_{ij} \), and on the right it is \( k a_{ij} + l a_{ij} \). These are equal by ordinary arithmetic, in every place, so the matrices are equal.

Solving matrix equations

Worked example

\( A = \begin{bmatrix} 1 & -2 \\ 3 & 0 \end{bmatrix} \), \( B = \begin{bmatrix} 5 & 2 \\ 3 & 3 \end{bmatrix} \). Find X with 3X + A = 2B.

  1. Add −A to both sides (−A is the additive inverse): 3X = 2B − A.
  2. \( 2B - A = \begin{bmatrix} 10 - 1 & 4 + 2 \\ 6 - 3 & 6 - 0 \end{bmatrix} = \begin{bmatrix} 9 & 6 \\ 3 & 6 \end{bmatrix} \).
  3. Multiply by \( \frac{1}{3} \): \( X = \begin{bmatrix} 3 & 2 \\ 1 & 2 \end{bmatrix} \).

Check: \( 3X + A = \begin{bmatrix} 10 & 4 \\ 6 & 6 \end{bmatrix} = 2B \).

With two unknown matrices, treat them like two unknown numbers. If X + Y = P and X − Y = Q, adding gives 2X = P + Q and subtracting gives 2Y = P − Q.

Try it. \( P = \begin{bmatrix} 6 & 2 \\ 4 & 8 \end{bmatrix} \), \( Q = \begin{bmatrix} 2 & -4 \\ 0 & 2 \end{bmatrix} \). Find X and Y if X + Y = P and X − Y = Q.

Answer
\( X = \frac{1}{2}(P + Q) = \begin{bmatrix} 4 & -1 \\ 2 & 5 \end{bmatrix} \) and \( Y = \frac{1}{2}(P - Q) = \begin{bmatrix} 2 & 3 \\ 2 & 3 \end{bmatrix} \). Check: X + Y = P.

Words to know

Sum A + B
Add matching entries; only for matrices of the same order.
Scalar
An ordinary number, as opposed to a matrix.
Scalar multiple kA
Every entry of A multiplied by k.
Negative −A
(−1)A: every sign flipped.
Additive identity
The zero matrix O, since A + O = A.
Additive inverse
−A, since A + (−A) = O.

A is 2 × 3 and B is 3 × 2. What is A + B?

  1. A 2 × 2 matrix
  2. A 3 × 3 matrix
  3. Not defined

If \( A = \begin{bmatrix} 2 & -1 \\ 0 & 4 \end{bmatrix} \), what is \( 3A - 2A \)?

  1. \( \begin{bmatrix} 2 & -1 \\ 0 & 4 \end{bmatrix} \)
  2. \( \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} \)
  3. O

Which matrix plays the part of 0 in matrix addition?

  1. The identity matrix I
  2. The zero matrix O of the same order
  3. The matrix −A