A Matrix That Turns the World

Talk it through with a coach who asks guiding questions and gives hints until you reach the answer. Pass to mark the challenge as completed.

The problem

  • medium
  • Pro

A game programmer wants to turn everything on screen a quarter turn anticlockwise about the centre. A character stands three units right of the centre and two units up. Explain how a matrix can do this turn, what its columns mean, and where the character ends up.

What a strong answer covers

  • What kind of movement a matrix can describe.
  • How the columns of a matrix encode it.
  • Where the two basic directions go under this turn.
  • The character's new position, built from those directions.

Common mistake: Turning the wrong way. Anticlockwise takes something pointing right to pointing up, not down.

Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.