Transformation Matrix Guide
Basic Idea
A libinput transformation matrix changes pointer or touch coordinates before they reach the desktop. The calculator models that mapping with normalized values. A point uses x and y values from zero to one. The matrix returns a new x and y value after rotation, flip, scale, shear, and offset.
Why The Matrix Matters
Touch screens, tablets, kiosks, and rotated displays often need calibration. A display may be mounted sideways. A panel may report mirrored input. A custom kiosk may need a smaller active area. The matrix fixes those cases without editing application code. It acts as a coordinate filter. That makes it useful for maths learning and device setup planning.
Core Matrix Behavior
The calculator uses six visible matrix values. They form a three by three affine matrix. The final row stays fixed as zero, zero, and one. This keeps the transform simple and practical. The a and e values usually control scaling. The b and d values handle rotation or shear. The c and f values shift the mapped point. The determinant shows the area change. It also shows whether the transform reverses orientation.
Advanced Options
Preset modes give fast starting points. Identity leaves the input unchanged. Rotation presets map common screen positions. Flip presets mirror one axis. Custom mode lets you enter every coefficient. Extra scale, shear, and translation controls are applied after the preset. This helps you build compound transforms in one pass.
Reading The Output
The output gives the final matrix string. It also gives the mapped test point. A determinant near zero warns about a collapsed coordinate plane. In that case, inverse mapping is unsafe. A positive determinant keeps orientation. A negative determinant means the transform includes a mirror. The inverse matrix is shown when it can be computed.
Practical Tips
Start with a preset close to your screen layout. Then adjust translation slowly. Use small steps, such as 0.01. Test the four corners. Try center point values too. Export results when the mapping looks correct. Keep a copy before changing a live device. This makes rollback easier and safer. Use the example table to compare expected movement, transformed output, and determinant meaning before saving a final calibration string for reuse.