Build affine matrices from real world transform controls. Combine rotation, scale, shear, and translation safely. See matrices, inverses, and point mappings in one place.
Build from transform parameters, or enter a matrix directly. The input grid adapts to screen size.
A 2D affine transform is represented with homogeneous coordinates:
| [x′] | = | [ a b tx ] [x] |
| [y′] | [ c d ty ] [y] | |
| [ 1 ] | [ 0 0 1 ] [1] |
Example setup: scale (1.2, 0.8) about (1,1), rotate 30° about (1,1), then translate (3, −2).
| 1.03923048 | -0.6 | 4.87846097 |
| 0.4 | 0.69282032 | -0.27846097 |
| 0 | 0 | 1 |
| Input (x, y) | Output (x′, y′) |
|---|---|
| 0, 0 | 4.87846097, -0.27846097 |
| 2, 0 | 6.95692194, 0.52153903 |
| 0, 2 | 3.67846097, 1.10717968 |
| 1, 1 | 5.31769145, 0.81435935 |
In 2D, an affine transform is fully described by six parameters: a, b, c, d, tx, ty. The linear block [[a,b],[c,d]] controls rotation, scaling, and shear, while (tx,ty) shifts the origin. Because it is linear-plus-translation, straight lines remain straight and parallel lines stay parallel. Circles typically become ellipses unless the linear part is a pure rotation or uniform scale.
When you combine operations, the final matrix depends on the order of multiplication. For example, scaling then translating moves points by the scaled translation, while translating then scaling leaves translation unscaled. Rotating after translating swings the translation vector around the origin. This calculator applies each operation as a 3×3 matrix and composes them via left-multiplication, matching graphics and geometry conventions. Custom sequences help you replicate pipeline steps from rendering, robotics frames, or image registration.
The determinant det(L)=a·d−b·c summarizes how the linear part stretches the plane. |det(L)| is the area scale factor: det=2 doubles areas, det=0.5 halves them, and det=0 collapses the plane to a line, making the transform non-invertible. A negative determinant indicates an orientation flip, often caused by reflections. Values very close to zero imply strong compression and unstable inverses; the tool flags non-invertibility at a threshold.
Pivots let you rotate or scale about an arbitrary point (px,py) rather than the global origin. Internally, the calculator uses T(px,py)·R·T(−px,−py) and T(px,py)·S·T(−px,−py) to keep the chosen point fixed. For rotations you can enter degrees or radians; internally radians are used for trigonometric evaluation. Shear factors shx and shy approximate tan(θ) for small angles, enabling slanted axes modeling. This mirrors workflows in CAD, animation rigs, and map projections.
Beyond the matrix, practical work needs mapped coordinates. Enter any list of points and the tool returns (x,y)→(x′,y′) pairs using homogeneous evaluation. The inverse matrix, when available, is computed from L^{-1} and the translated term −L^{-1}t, letting you back-transform measurements. The CSV export is suited for spreadsheets and checks, while the PDF captures matrices, determinant, inverse status, and mapping tables for documentation and audit trails.
It preserves collinearity and parallelism: straight lines map to straight lines and parallel lines remain parallel. Ratios along the same line are preserved, but lengths and angles generally change unless the linear part is a pure rotation.
Matrix multiplication is not commutative. Scaling then translating scales the translation effect, while translating then scaling does not. The same applies to rotation, shear, and reflection, so the sequence must match your intended workflow.
|det(L)| is the area scale factor of the linear part. det(L)=1 preserves area, det(L)=2 doubles it, and det(L)<0 indicates an orientation flip. If det(L)=0, the transform collapses dimensions and cannot be inverted.
If the linear determinant is zero (or extremely close to zero), the mapping is not one-to-one. Points can collapse onto a line or a point, so there is no unique way to reverse the transform.
A pivot keeps a chosen point fixed. The tool applies translate-to-pivot, then rotate/scale, then translate back: T(p)·R·T(−p) or T(p)·S·T(−p). This matches common CAD and graphics behavior.
shx skews x as x′=x+shx·y, and shy skews y as y′=y+shy·x (before translation). For small angles, shear is approximately tan(θ). Large values can strongly distort shapes and reduce invertibility.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.