Matrix–Vector Multiplication and Determinant

Multiplying a vector by a 2×2 matrix (a b / c d) transforms points: scaling, rotation, shearing and more.

(X, Y) = (a x + b y, c x + d y)  det = ad − bc

The determinant ad − bc is how much areas are scaled. If it is 0 the plane is flattened and the transform cannot be undone.

Watch how the grid in the picture deforms under the matrix.

Calculator

Change a value and the result and picture update instantly.

Result

New X2.5
New Y1
Determinant1

Animated picture

The picture follows your values. Some points and shapes can be dragged.

Use in game development

Scaling, rotating and skewing sprites and camera transforms are all matrix math.

Code example (JavaScript)

const X = m[0]*x + m[1]*y, Y = m[2]*x + m[3]*y;

What the symbols mean

SymbolMeaning
aMatrix a
bMatrix b
cMatrix c
dMatrix d
xPoint x
yPoint y
XNew X
YNew Y
detDeterminant

More formulas in this category

Frequently asked questions

What is the formula for Matrix–Vector Multiplication and Determinant?
The formula for Matrix–Vector Multiplication and Determinant is (X, Y) = (a x + b y, c x + d y)  det = ad − bc. Multiplying a vector by a 2×2 matrix (a b / c d) transforms points: scaling, rotation, shearing and more.

Math Formula Quiz Vectors & Matrices

Sources

Checked: 2026-11-29