Adding, Subtracting and Scaling Matrices

Entry by entry, when the orders match.

Add entry by entry

Two matrices of the same order are added by adding the entries in the same place. Take A = (3 1; 0 5) and B = (1 4; 6 2), where the semicolon separates the first row from the second.

The top left entries give 3 + 1 = 4, the top right 1 + 4 = 5, the bottom left 0 + 6 = 6, and the bottom right 5 + 2 = 7. So A + B = (4 5; 6 7), another 2 × 2 matrix.

The rule makes sense because each place holds the same kind of quantity in both matrices. If A and B are two weeks of sales, with one row for each shop and one column for each item, the top right entries are the same shop’s sales of the same item, and adding them gives that shop’s total for the item.

A3105B1462A + B4567+=

The top right entry of A + B comes from the top right entries of A and B: 1 + 4 = 5.

Subtracting

Subtraction works the same way: subtract each entry of B from the entry in the same place in A. That gives 3 − 1 = 2, 1 − 4 = −3, 0 − 6 = −6 and 5 − 2 = 3, so A − B = (2 −3; −6 3).

The order of a subtraction matters, as it does for numbers. B − A has every entry with the opposite sign: B − A = (−2 3; 6 −3).

Check a difference by adding it back on. B + (A − B) should give A, and it does: 1 + 2 = 3, 4 + (−3) = 1, 6 + (−6) = 0 and 2 + 3 = 5.

A3105B1462A − B2−3−63−=

The bottom left entry of A − B is 0 − 6 = −6. A difference can have negative entries even when both matrices are positive.

The orders must match

A sum pairs every entry with the entry in the same place, so both matrices must have the same order. A 2 × 2 and a 2 × 3 cannot be added: the third column of the 2 × 3 has nothing to be added to.

Holding the same number of entries is not enough. A 2 × 3 and a 3 × 2 each hold 6 entries, but the places do not line up: the 2 × 3 has a row 1, column 3 and the 3 × 2 does not. Writing one of them with its rows as columns does not rescue the sum, because that makes a different matrix.

314275102631+

A 2 × 3 and a 3 × 2 each hold six entries, but their places do not match, so this sum cannot be done.

Either order for a sum

Each entry of A + B is a sum of two numbers, and addition of numbers is commutative, so A + B = B + A for any two matrices of the same order. In the same way (A + B) + C = A + (B + C): matrix addition is associative.

Multiplying by a scalar

A single number multiplying a matrix is called a scalar. It multiplies every entry: 3 × (2 1; 0 4) = (6 3; 0 12), because 3 × 2 = 6, 3 × 1 = 3, 3 × 0 = 0 and 3 × 4 = 12. The order does not change.

This agrees with addition. Write M = (2 1; 0 4). Then 3M means M + M + M, and adding three copies of M adds each entry to itself three times: the top left becomes 2 + 2 + 2 = 6.

M2104M2104M21043M63012++=

Three copies of M = (2 1; 0 4) added together give 3M. The bottom right entry is 4 + 4 + 4 = 3 × 4 = 12.

Fractions, negatives and combinations

A scalar can be a fraction or a decimal: ½ × (4 6; 2 8) = (2 3; 1 4). It can be negative too, and −1 × B changes the sign of every entry, so A − B is the same as A + (−1)B.

Scalar multiples and sums combine. With A = (3 1; 0 5) and B = (1 4; 6 2), 2A = (6 2; 0 10). Subtracting B entry by entry gives 6 − 1 = 5, 2 − 4 = −2, 0 − 6 = −6 and 10 − 2 = 8, so 2A − B = (5 −2; −6 8).

The usual mistakes

Adding entries from different places. The top right of A + B is 1 + 4, from the top right of each matrix, not 1 + 6, which takes the 6 from the bottom left of B.

Adding the scalar instead of multiplying. 3 × (2 1; 0 4) has 6 in the top left, not 2 + 3 = 5.

Multiplying only one entry by the scalar. Every entry is multiplied, so a 0 stays 0 and every other entry changes.

Adding matrices of different orders, or turning one on its side to make the orders agree. Only matrices of the same order can be added.

Sales and prices

In the first application below, two weeks of café sales are added for the total and subtracted for the change, where a negative entry is a fall. In the second, a price rise and then a discount are each a scalar, and the two scalars multiply into one.

Worked example: Two Weeks of Café Sales Added, and the Change from One Week to the Next

Question A café has two branches, Station and Park. The cups of coffee, tea and juice sold in two weeks are given by the matrices below, with one row for each branch: week 1 is A = 1204530956025 and week 2 is B = 11050351055530. (a) Find A + B, and say what the entry in row 2, column 1 means. (b) Find B − A. Which drinks sold fewer cups in week 2 than in week 1, and at which branch?

  1. 1.Both matrices have order 2 × 3, with the branches in the rows and coffee, tea and juice in the columns, so they can be added and subtracted entry by entry.

    week 1, AcoffeeteajuiceStation1204530Park956025week 2, BcoffeeteajuiceStation1105035Park1055530both are 2 × 3: add entry by entry
    week 1, AcoffeeteajuiceStation1204530Park956025week 2, BcoffeeteajuiceStation1105035Park1055530both are 2 × 3: add entry by entry
    Both matrices are 2 × 3, with the same branch in each row and the same drink in each column, so they add entry by entry.
  2. 2.Add each entry to the one in the same place: A + B = 120 + 11045 + 5030 + 3595 + 10560 + 5525 + 30 = 230956520011555.

    the two weeks together, A + BcoffeeteajuiceStation2309565Park20011555Station coffee: 120 + 110 = 230A + B =230956520011555
    the two weeks together, A + BcoffeeteajuiceStation2309565Park20011555Station coffee: 120 + 110 = 230A + B =230956520011555
    A + B = 230956520011555.
  3. 3.(a) The entry in row 2, column 1 is 200. Row 2 is Park and column 1 is coffee, so the Park branch sold 200 cups of coffee over the two weeks.

    the two weeks together, A + BcoffeeteajuiceStation2309565Park20011555row 2 is Park, column 1 is coffee200 cups of coffee over two weeks
    the two weeks together, A + BcoffeeteajuiceStation2309565Park20011555row 2 is Park, column 1 is coffee200 cups of coffee over two weeks
    (a) Row 2, column 1 is Park and coffee: the Park branch sold 200 cups of coffee over the two weeks.
  4. 4.Subtract entry by entry: B − A = 110 − 12050 − 4535 − 30105 − 9555 − 6030 − 25 = −105510−55.

    the change, week 2 minus week 1coffeeteajuiceStation−1055Park10−55Station coffee: 110 − 120 = −10B − A =−105510−55
    the change, week 2 minus week 1coffeeteajuiceStation−1055Park10−55Station coffee: 110 − 120 = −10B − A =−105510−55
    B − A = −105510−55.
  5. 5.(b) A negative entry is a fall. Station sold 10 fewer cups of coffee and Park sold 5 fewer cups of tea; every other entry is positive, so those sales rose. Check: A + (B − A) gives B again, for example 120 + (−10) = 110.

    the change, week 2 minus week 1coffeeteajuiceStation−1055Park10−55−10: Station sold 10 fewer coffees−5: Park sold 5 fewer teascheck: 120 + (−10) = 110
    the change, week 2 minus week 1coffeeteajuiceStation−1055Park10−55−10: Station sold 10 fewer coffees−5: Park sold 5 fewer teascheck: 120 + (−10) = 110
    (b) The negative entries are the falls: coffee at Station, down 10 cups, and tea at Park, down 5 cups.

Answer: (a) A + B = 230956520011555; the 200 is the cups of coffee sold at Park over the two weeks; (b) B − A = −105510−55: coffee at Station fell by 10 cups and tea at Park by 5 cups

Common mistakes

  • Subtracting the wrong way round and finding A − B. The change from week 1 to week 2 is week 2 minus week 1, so that a fall comes out negative.
  • Trying to add A to a matrix of a different order, such as the same figures written with one row for each drink. Matrices can be added only when they have the same order, so that each entry has a partner in the same place.

More matrix arithmetic problems, worked step by step →

Worked example: A Price Rise and Then a Discount Card Applied to a Price List

Question Two shops, A and B, sell school shirts, trousers and jackets. Their prices in dollars are the matrix P = 203550253040, with one row for each shop. Next term every price rises by 20%. (a) Find the matrix of new prices. (b) A parent has a card that takes 25% off every new price. Write the prices the parent pays as a single number times P, find them, and say how each compares with the price before the rise.

  1. 1.A rise of 20% multiplies every price by 1 + 0.2 = 1.2, so the new prices are the scalar multiple 1.2P: every entry of P is multiplied by 1.2.

    prices now, $shirttrousersjacketshop A203550shop B253040a 20% rise: every price × 1.2
    prices now, $shirttrousersjacketshop A203550shop B253040a 20% rise: every price × 1.2
    A rise of 20% multiplies every price by 1.2: the new prices are the scalar multiple 1.2P.
  2. 2.(a) 1.2P = 1.2 × 201.2 × 351.2 × 501.2 × 251.2 × 301.2 × 40 = 244260303648 dollars.

    after the 20% rise, $shirttrousersjacketshop A244260shop B3036481.2 × 20 = 24, 1.2 × 35 = 42, 1.2 × 50 = 601.2 × 25 = 30, 1.2 × 30 = 36, 1.2 × 40 = 481.2P =244260303648
    after the 20% rise, $shirttrousersjacketshop A244260shop B3036481.2 × 20 = 24, 1.2 × 35 = 42, 1.2 × 50 = 601.2 × 25 = 30, 1.2 × 30 = 36, 1.2 × 40 = 481.2P =244260303648
    (a) 1.2P = 244260303648 dollars.
  3. 3.Taking 25% off leaves 75%, so the card multiplies each new price by 0.75. The parent pays 0.75(1.2P), and the two scalars multiply together: 0.75 × 1.2 = 0.9, so the parent pays 0.9P.

    after the 20% rise, $shirttrousersjacketshop A244260shop B30364825% off leaves 75%: × 0.750.75 × 1.2 = 0.9, so the parent pays 0.9P
    after the 20% rise, $shirttrousersjacketshop A244260shop B30364825% off leaves 75%: × 0.750.75 × 1.2 = 0.9, so the parent pays 0.9P
    The card leaves 75% of each new price, so the parent pays 0.75(1.2P) = 0.9P.
  4. 4.0.9P = 0.9 × 200.9 × 350.9 × 500.9 × 250.9 × 300.9 × 40 = 1831.54522.52736 dollars: for example, the trousers at shop A cost the parent $31.50.

    what the parent pays, $shirttrousersjacketshop A1831.5045shop B22.5027360.9P =1831.54522.52736trousers at shop A: 0.9 × 35 = $31.50
    what the parent pays, $shirttrousersjacketshop A1831.5045shop B22.5027360.9P =1831.54522.52736trousers at shop A: 0.9 × 35 = $31.50
    0.9P = 1831.54522.52736 dollars.
  5. 5.(b) The parent pays 0.9P, so every price is 10% below what it was before the rise. Check on one entry: the jacket at shop B rises to 1.2 × 40 = $48, and 75% of $48 is $36, which is 0.9 × 40.

    what the parent pays, $shirttrousersjacketshop A1831.5045shop B22.502736every price is 10% below the price before the risecheck: 1.2 × 40 = 48, and 0.75 × 48 = 36 = 0.9 × 40
    what the parent pays, $shirttrousersjacketshop A1831.5045shop B22.502736every price is 10% below the price before the risecheck: 1.2 × 40 = 48, and 0.75 × 48 = 36 = 0.9 × 40
    (b) The parent pays 0.9P: every price is 10% below the price before the rise.

Answer: (a) 1.2P = 244260303648 dollars; (b) 0.9P = 1831.54522.52736 dollars, every price 10% below the price before the rise

Common mistakes

  • Combining the percentages as 20% − 25% = −5% and multiplying by 0.95. The discount is taken off the new, higher price, so the scalars multiply: 1.2 × 0.75 = 0.9, which is 10% off.
  • Adding 20 to every entry. A 20% rise is a different amount on each item, $4 on a $20 shirt and $10 on a $50 jacket, so every entry is multiplied by 1.2 instead.

More matrix arithmetic problems, worked step by step →

Practice Adding, Subtracting and Scaling Matrices in the app