2D Coordinate Transformation Calculator

Transform points with translate, rotate, reflect, scale, or a chained affine sequence. Results update instantly and everything runs locally in your browser.

Points & Transform

Tip: Paste CSV pairs or type values. Use the Examples button to load shapes.

Transformed points will appear here...

Rotation: (x',y') = (cₓ + cosθ(x−cₓ) − sinθ(y−c_y), c_y + sinθ(x−cₓ) + cosθ(y−c_y)); Scaling about (cₓ,c_y): (x',y') = (cₓ + sₓ(x−cₓ), c_y + s_y(y−c_y)). Reflection over ax+by+c=0 uses d=(ax+by+c)/(a²+b²), then (x',y')=(x-2ad,y-2bd). The Apply button remains as a fallback; changes calculate automatically.

Preview

Blue = original, Red = transformed. The view auto-scales to fit all points. Grid and axes are illustrative.

Graph summary will appear after valid points are entered.

Advertisement

Coordinate Transformations in 2D: A Quick Guide

This coordinate transformation calculator applies translation, rotation, reflection, scaling, and chained affine transformations to one or many points in the plane. Use it for geometry homework, computer graphics, robotics, CAD, GIS, or any workflow where you need original-to-transformed coordinates and the matching matrix.

  • Translation adds a fixed offset: (x',y') = (x + Δx, y + Δy).
  • Rotation by angle θ about a center (cₓ,c_y): x' = cₓ + cosθ(x−cₓ) − sinθ(y−c_y), y' = c_y + sinθ(x−cₓ) + cosθ(y−c_y).
  • Scaling about (cₓ,c_y) with factors sₓ, s_y: x' = cₓ + sₓ(x−cₓ), y' = c_y + s_y(y−c_y) (uniform if sₓ=s_y).
  • Reflection works over axes, y=x, y=−x, an angle line, y=mx+b, ax+by+c=0, or a line through two points.

Under the hood, these are affine transformations—linear maps optionally combined with translation. In matrix form, a point is extended to homogeneous coordinates (x,y,1) and multiplied by a 3×3 matrix, which makes chaining operations straightforward. In sequence mode, the calculator multiplies matrices in the order you enter operations and shows the combined matrix.

Pro tip: For “rotate/scale about a point”, set the center to the shape’s centroid if you want to keep it roughly in place as you transform.

Step-by-Step Examples

Translate point (2, 3) by (4, -1)

Input: point (2,3), vector (Δx,Δy)=(4,-1).

Substitute: (x',y')=(2+4, 3-1).

Result: (6, 2).

Enter: points 2,3, mode Translate, Δx=4, Δy=-1.

Rotate (3, 1) by 90° about the origin

Input: point (3,1), angle 90°, center (0,0).

Substitute: x'=3cos90°-1sin90°=-1, y'=3sin90°+1cos90°=3.

Result: (-1, 3).

Enter: points 3,1, mode Rotate, Angle=90, center blank or 0,0.

Reflect (5, -2) over the x-axis

Input: point (5,-2), mirror line y=0.

Substitute: x stays the same and y changes sign: (x',y')=(5, -(-2)).

Result: (5, 2).

Enter: points 5,-2, mode Reflect, mirror line x-axis.

Scale a triangle about a center

Input: triangle (1,1), (3,1), (1,2); scale 2 about (1,1).

Substitute: x'=1+2(x-1), y'=1+2(y-1).

Result: (1,1), (5,1), (1,3).

Enter: mode Scale, Scale x=2, Scale y=2, about 1,1.

Formula Table

Transform Input parameters Coordinate rule Matrix form Preserves Common use case
Translation Δx, Δy (x+Δx, y+Δy) [[1,0,Δx],[0,1,Δy],[0,0,1]] Distance and angle Move a shape without changing it
Rotation θ, cx, cy (cx+cX-sY, cy+sX+cY) T(cx,cy)R(θ)T(-cx,-cy) Distance and angle Turn points around a center
Reflection Mirror line (x-2ad, y-2bd) for ax+by+c=0 Line-specific affine matrix Distance and angle, reverses orientation Mirror across axes or any line
Scaling / dilation sx, sy, cx, cy (cx+sx(x-cx), cy+sy(y-cy)) T(cx,cy)S(sx,sy)T(-cx,-cy) Angles only when uniform Resize around origin or a fixed point
Shear kx or ky (x+ky, y) or (x, y+kx) [[1,k,0],[0,1,0],[0,0,1]] Parallel lines Slant shapes in graphics
Affine sequence Ordered operations p'=Mnp M = Mn...M2M1 Depends on operations Combine move, turn, resize, and mirror

Transformation Matrices

These matrices use column vectors: [x', y', 1]ᵀ = M[x, y, 1]ᵀ.

Translation

[1 0 tx; 0 1 ty; 0 0 1]

Rotation About Origin

[cosθ -sinθ 0; sinθ cosθ 0; 0 0 1]

Scale About Origin

[sx 0 0; 0 sy 0; 0 0 1]

Reflection Over ax+by+c=0

1/(a²+b²) · [[b²-a², -2ab, -2ac], [-2ab, a²-b², -2bc], [0,0,a²+b²]]

Combined Affine Transform

For operations entered in order, M = Mₙ...M₂M₁. The first operation is closest to the point vector.

Inverse Transform

If M is invertible, recover the original point with p = M⁻¹p'. Zero scale factors are not invertible.

Common Mistakes

Positive vs negative rotation

This calculator uses positive counter-clockwise angles in a standard y-up coordinate plane. Use negative angles for clockwise rotation.

Angle sign

Active vs passive transformations

The tool moves points in a fixed coordinate system. Rotating the coordinate axes instead is a passive transformation and uses the inverse rotation.

Convention

Degrees vs radians

Angle inputs are degrees. If your source gives radians, convert first: degrees = radians × 180 / π.

Units

Order of chained transforms

Order matters. Translate then rotate is usually not the same as rotate then translate, because matrix multiplication is not commutative.

Composition

Origin vs center scaling

Scaling about the origin moves points away from or toward (0,0). Scaling about a chosen center keeps that center fixed.

Dilation center

Screen coordinates

Many canvases and image tools use y-down screen coordinates. This calculator reports mathematical y-up coordinates.

Y direction

Methodology and Trust

Coordinate convention: standard 2D Cartesian coordinates with positive x to the right and positive y upward. Angles are degrees, positive counter-clockwise, and transformations are active point transformations.

Rounding policy: calculations use JavaScript floating-point arithmetic and display values rounded to 6 decimal places. Exports use the same rounded values for consistency.

Privacy: points and transformations stay in your browser. The tool does not upload your coordinates.

Formulas follow standard affine transformation and homogeneous-coordinate matrices. Last reviewed: June 10, 2026. References: Transformation matrix, Math Is Fun rotation, Math Is Fun reflection.

Frequently Asked Questions

How do I enter multiple points?

Enter one pair per line as x,y. Example: 0,0 then 2,1 then 4,0.

What angle convention is used?

Angles are in degrees, positive counter-clockwise.

How do you rotate a point around another point?

Subtract the center, rotate the shifted point, then add the center back. The Rotate mode does this automatically when you enter center x and center y.

What is the 2D rotation formula?

About the origin, x'=xcosθ-ysinθ and y'=xsinθ+ycosθ. About (cx,cy), apply the same rule to x-cx and y-cy, then add the center back.

How do you reflect a point over y=mx+b?

Use Reflect, choose line y=mx+b, and enter m and b. Internally the calculator converts it to mx-y+b=0 and applies the standard line reflection formula.

What is a homogeneous coordinate matrix?

It is a 3×3 matrix that multiplies [x,y,1]ᵀ. The extra coordinate lets translation share the same matrix form as rotation, scale, and reflection.

Does order matter when combining transformations?

Yes. In sequence mode, operations are applied from top to bottom. Translate then rotate usually gives a different final point than rotate then translate.

What is the difference between active and passive coordinate transformations?

An active transformation moves the point or shape. A passive transformation changes the axes used to describe the same point. This calculator uses active transformations.

Is my data private?

Yes. Everything runs locally in your browser; nothing is uploaded.

Explore more tools