Geometric Transformation Matrix Calculator — Translate, Rotate, Scale and Reflect

Compose translation, rotation, scale, and reflection operations into one 3×3 matrix, then apply it to 2D points. Inputs stay in your browser.

Points and Operations

Operations, applied top to bottom

Maximum 12

Combined Matrix

p′ = Mp
100 010 001

Calculate to compose the operations from top to bottom.

Linear determinant
Orientation
Inverse
Original and transformed points Calculate to preview the original and transformed points on a Cartesian grid.
Pointxyx′y′
No calculated points yet.

Advertisement

Matrix Working

For column vectors, each new operation multiplies on the left. If operation 1 happens first, the total is M = Mₙ ··· M₂ M₁.

Calculate a valid sequence to see every operation matrix and the final composition.

2D Transformation Matrix Formulas

The calculator uses active transformations on a standard Cartesian plane where positive y points upward. Each point is represented as the homogeneous column vector [x, y, 1]ᵀ.

Translation

T = [[1, 0, tx], [0, 1, ty], [0, 0, 1]]

Adds tx to x and ty to y.

Rotation

R = [[cosθ, −sinθ, 0], [sinθ, cosθ, 0], [0, 0, 1]]

Positive angles rotate counter-clockwise. A custom center uses T(c)R T(−c).

Scale

S = [[sx, 0, 0], [0, sy, 0], [0, 0, 1]]

Equal factors give uniform scale. A custom center uses T(c)S T(−c).

Reflection across an angled line

F = [[cos2α, sin2α], [sin2α, −cos2α]]

This is the 2×2 linear part for a line through the origin at angle α.

Conventions: Operations are active, points are column vectors, positive rotation is counter-clockwise, and angles are measured from the positive x-axis. The displayed precision changes formatting only; calculations retain unrounded floating-point values.

How to Use the Transformation Matrix Calculator

  1. Enter one or more points as x,y, one point per line.
  2. Add translation, rotation, scale, or reflection operations. Use the arrow buttons to change their order.
  3. Set each operation’s parameters. Rotation and scale can use a custom fixed center; reflection can use a standard or angled line.
  4. Select Calculate matrix to compose the 3×3 matrix and transform every point.
  5. Copy a plain-text summary or download the coordinate table as CSV.

Examples and Order

Translate then rotate

For T(3,2) followed by a 90° rotation, M = R T. Point (1,0) first moves to (4,2), then rotates to (−2,4).

Rotate then translate

Reversing the same operations gives M = T R. Point (1,0) rotates to (0,1), then moves to (3,3).

Scale about a point

Scaling by 2 about (1,1) keeps that center fixed. Point (3,2) has offset (2,1), which doubles to (4,2), giving (5,3).

Common Transformation Mistakes

Reading products left to right

With column vectors, the rightmost matrix acts first. The interface avoids ambiguity by listing operations in actual application order.

Using screen coordinates

Many graphics systems increase y downward, which can make positive rotation look clockwise. This tool uses mathematical y-up coordinates.

Scaling about the wrong center

A scale about the origin moves every non-origin point. Enter a custom center when a particular point must remain fixed.

Transformation Matrix FAQs

Why use a 3×3 matrix for 2D geometry?

A 2×2 matrix can rotate, scale, shear, or reflect, but it cannot represent translation by itself. Homogeneous coordinate 1 lets translation fit into the third column of a 3×3 matrix.

Does the order of transformations matter?

Yes. Translation, rotation, scale, and reflection generally do not commute. Moving a shape and then rotating it typically differs from rotating it and then moving it.

How do I rotate clockwise?

Enter a negative angle. Under the tool’s y-up convention, positive angles are counter-clockwise and negative angles are clockwise.

What does a negative determinant mean?

The linear part reverses orientation, as a single reflection does. A positive determinant preserves orientation. A zero determinant collapses the plane and makes the transform non-invertible.

Can I reflect across a line that does not pass through the origin?

Yes. Choose an angled line, enter a point on the line, and enter its direction angle. Horizontal and vertical offset lines also have dedicated choices.

Why might a result show scientific notation?

Very large or very small non-zero results use scientific notation so their scale remains visible without an excessively wide result table.

Are the calculations private?

Yes. The calculator script processes the operation sequence and coordinates locally and does not transmit or store the entered values.

Calculation Notes

Last reviewed: July 30, 2026 by the Starlight Tools editorial team.

The implementation uses standard homogeneous affine-matrix multiplication. Inputs and intermediate results must be finite and no larger than 10¹⁰⁰ in magnitude. JavaScript uses IEEE 754 double-precision arithmetic, so results near numerical limits may lose precision.

Explore more tools