(in the plane)
Suppose that a Cartesian coordinate system has a given x-axis and y-axis with origin O and given unit length, so that a typical point P has coordinates (x, y). Consider taking a new coordinate system with the same origin O and the same unit length, with X-axis and Y-axis, such that a rotation through an angle α (with the positive direction taken anticlockwise) carries the x-axis to the X-axis and the y-axis to the Y-axis. With respect to the new coordinate system, the point P has coordinates (X, Y). Then the old and new coordinates in such a rotation of axes are related by
x = X cos α − Y sin α,
y = X sin α + Y cos α.
In matrix notation, these equations become
and, conversely,For example, in a rotation of axes through an angle of −π/4 radians, the coordinates are related byand the curve with equation x2−y2=2 has equation XY=1 in the new coordinate system.