๐Ÿ  Home โ€บ ๐Ÿ”ข Matrix Math โ€บ Lesson 7

๐Ÿ› ๏ธ Matrices at Work โ€” Scores, Photos, Codes, and Flips

๐Ÿ“– Lesson 7 of 9

๐Ÿ“Œ Key idea of this section

Photos, scoreboards, secret codes, and 3D games
all run on the grid moves you just learned.

Scoreboards: totals and weighted points

Addition totals up rounds; multiplication applies weights. If a win in one event is worth more than a win in another, put the points in a column and multiply โ€” every row (player) meets the points column, and out pops each player's total. That's the bakery trick wearing a sports jersey.

Photos: a picture made of numbers

A grayscale photo is a grid of brightness numbers โ€” 0 is black, 9 is white, and the numbers between are grays. Multiply the photo by 2 and every pixel gets brighter; multiply by 1/2 and it darkens. Photo apps do exactly this, millions of squares at a time. (The practice problems include a tiny photo to brighten โ€” watch out for a pixel that blasts past 9!)

Secret codes: scramble a message

Turn letters into numbers (A = 1, B = 2, ..., Z = 26) and stack them in a column. Then multiply by a scrambler grid:

"HI" = [ 8 ]        [ 1  1 ] ร— [ 8 ] = [ 17 ]
       [ 9 ]        [ 0  1 ]   [ 9 ]   [  9 ]

The coded message is 17, 9 โ€” nobody can read it... unless they know the trick: subtract the second number from the first (17 โˆ’ 9 = 8) and keep the second (9). Back comes 8, 9 = "HI"! The scrambler leaned on the row ร— column machine, and decoding is the undo idea from Lesson 6 in action. A real code called the Hill cipher (invented in 1929) used this exact trick! Today's computers protect messages with even trickier math โ€” but grids like this were a big step along the way.

Flips: the swapper grid

A point on graph paper is a pair of numbers, so it's a column grid. Multiply it by the swapper from Lesson 5:

[ 0  1 ] ร— [ 3 ] = [ 5 ]
[ 1  0 ]   [ 5 ]   [ 3 ]

The coordinates switched places โ€” (3, 5) flipped to (5, 3), a mirror-flip across the diagonal line on graph paper! Every 3D game flips, spins, and stretches its world with grids like this, millions of points per second. That spinning dragon? Matrix math.

โœ๏ธ Your Turn!

Use the swapper [ 0 1 ; 1 0 ] on the point (2, 7). What point comes out?

๐Ÿ‘€ Show the answers

Answer: [ 0 1 ; 1 0 ] ร— [ 2 ; 7 ] = [ 7 ; 2 ] โ€” the point flips to (7, 2).

V.3.1