CalcHub

Free calculator tools. Fast, simple, no sign up.

Matrix Algebra and Computer Graphics

A matrix is a grid of numbers that represents a system of equations, a transformation, or a set of data. Matrices power computer graphics,...

A matrix is a grid of numbers that represents a system of equations, a transformation, or a set of data. Matrices power computer graphics, spreadsheets, and much of modern maths.

How it works

A 2 by 2 matrix has 2 rows and 2 columns. Adding matrices means adding matching entries. Multiplying a matrix by a number multiplies every entry. Multiplying two matrices is different: each entry of the answer is the dot product of a row of the first matrix and a column of the second. For [[1, 2], [3, 4]] times [[5, 6], [7, 8]], the top-left entry is 1 times 5 plus 2 times 7, which is 19, and the full answer is [[19, 22], [43, 50]]. Matrix multiplication only works when the inner sizes match: a 2 by 3 matrix can multiply a 3 by 2 matrix, but not a 2 by 2 one.

In graphics, matrices rotate, scale, and move shapes. A rotation matrix turns a shape by an angle, and multiplying a point by the matrix gives its new position. That is how games and animation move objects on screen.

Worked example

Multiply [[2, 0], [0, 3]] by the point (4, 5). The result is (2 times 4, 3 times 5), which is (8, 15). The matrix scales x by 2 and y by 3.

Common mistakes

The most common error is multiplying matrices entry by entry. Matrix multiplication uses row-by-column dot products, not matching entries.

Try it yourself

Multiply [[1, 2], [0, 1]] by [[3], [4]] as a column. (Answer: (11, 4).)

Putting it together

Keep a short note of the formula or rule from this guide, with one worked example beside it. A single page of such notes, built topic by topic, becomes a revision sheet that is far more useful than a textbook chapter. Revisit the note after a week and try the practice question again without looking. If you can do it cold, the topic is yours.

A question to ask yourself

Why does this method work? Because each step keeps both sides equal, or keeps the value unchanged. Methods that preserve equality or value are safe to use again and again, and that is why they appear in so many topics.