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 X
New Y
Determinant
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
| Symbol | Meaning |
|---|---|
a | Matrix a |
b | Matrix b |
c | Matrix c |
d | Matrix d |
x | Point x |
y | Point y |
X | New X |
Y | New Y |
det | Determinant |
More formulas in this category
- Vector Addition and Length
- Unit Vectors (Normalization)
- Dot Product and the Angle Between Vectors
- Cross Product (2D)
- Rotation Matrix
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