Distance between two points The
Euclidean distance between two points of the plane with Cartesian coordinates (x_1, y_1) and (x_2, y_2) is d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2}. This is the Cartesian version of
Pythagoras's theorem. In three-dimensional space, the distance between points (x_1,y_1,z_1) and (x_2,y_2,z_2) is d = \sqrt{(x_2-x_1)^2 + (y_2-y_1)^2+ (z_2-z_1)^2} , which can be obtained by two consecutive applications of Pythagoras' theorem.
Euclidean transformations The
Euclidean transformations or
Euclidean motions are the (
bijective) mappings of points of the
Euclidean plane to themselves which preserve distances between points. There are four types of these mappings (also called isometries):
translations,
rotations,
reflections and
glide reflections.
Translation Translating a set of points of the plane, preserving the distances and directions between them, is equivalent to adding a fixed pair of numbers to the Cartesian coordinates of every point in the set. That is, if the original coordinates of a point are , after the translation they will be (x', y') = (x + a, y + b) .
Rotation To
rotate a figure
counterclockwise around the origin by some angle \theta is equivalent to replacing every point with coordinates (
x,
y) by the point with coordinates (
x',
y'), where \begin{align} x' &= x \cos \theta - y \sin \theta \\ y' &= x \sin \theta + y \cos \theta . \end{align} Thus: (x',y') = ((x \cos \theta - y \sin \theta\,) , (x \sin \theta + y \cos \theta\,)) .
Reflection If are the Cartesian coordinates of a point, then are the coordinates of its
reflection across the second coordinate axis (the y-axis), as if that line were a mirror. Likewise, are the coordinates of its reflection across the first coordinate axis (the x-axis). In more generality, reflection across a line through the origin making an angle \theta with the x-axis, is equivalent to replacing every point with coordinates by the point with coordinates , where \begin{align} x' &= x \cos 2\theta + y \sin 2\theta \\ y' &= x \sin 2\theta - y \cos 2\theta . \end{align} Thus: (x',y') = ((x \cos 2\theta + y \sin 2\theta\,) , (x \sin 2\theta - y \cos 2\theta\,)) .
Glide reflection A glide reflection is the composition of a reflection across a line followed by a translation in the direction of that line. It can be seen that the order of these operations does not matter (the translation can come first, followed by the reflection).
General matrix form of the transformations All
affine transformations of the plane can be described in a uniform way by using matrices. For this purpose, the coordinates (x,y) of a point are commonly represented as the
column matrix \begin{pmatrix}x\\y\end{pmatrix}. The result (x', y') of applying an affine transformation to a point (x,y) is given by the formula \begin{pmatrix}x'\\y'\end{pmatrix} = A \begin{pmatrix}x\\y\end{pmatrix} + b, where A = \begin{pmatrix} A_{1,1} & A_{1,2} \\ A_{2,1} & A_{2,2} \end{pmatrix} is a 2×2
matrix and b=\begin{pmatrix}b_1\\b_2\end{pmatrix} is a column matrix. That is, \begin{align} x' &= x A_{1,1} + y A_{1,1} + b_{1} \\ y' &= x A_{2,1} + y A_{2, 2} + b_{2}. \end{align} Among the affine transformations, the
Euclidean transformations are characterized by the fact that the matrix A is
orthogonal; that is, its columns are
orthogonal vectors of
Euclidean norm one, or, explicitly, A_{1,1} A_{1, 2} + A_{2,1} A_{2, 2} = 0 and A_{1, 1}^2 + A_{2,1}^2 = A_{1,2}^2 + A_{2, 2}^2 = 1. This is equivalent to saying that times its
transpose is the
identity matrix. If these conditions do not hold, the formula describes a more general
affine transformation. The transformation is a translation
if and only if is the
identity matrix. The transformation is a rotation around some point if and only if is a
rotation matrix, meaning that it is orthogonal and A_{1, 1} A_{2, 2} - A_{2, 1} A_{1, 2} = 1 . A reflection or glide reflection is obtained when, A_{1, 1} A_{2, 2} - A_{2, 1} A_{1, 2} = -1 . Assuming that translations are not used (that is, b_1=b_2=0) transformations can be
composed by simply multiplying the associated transformation matrices. In the general case, it is useful to use the
augmented matrix of the transformation; that is, to rewrite the transformation formula \begin{pmatrix}x'\\y'\\1\end{pmatrix} = A' \begin{pmatrix}x\\y\\1\end{pmatrix}, where A' = \begin{pmatrix} A_{1,1} & A_{1,2}&b_1 \\ A_{2,1} & A_{2,2}&b_2\\0&0&1 \end{pmatrix}. With this trick, the composition of affine transformations is obtained by multiplying the augmented matrices.
Affine transformation Affine transformations of the
Euclidean plane are transformations that map lines to lines, but may change distances and angles. As said in the preceding section, they can be represented with augmented matrices: \begin{pmatrix} A_{1,1} & A_{2,1} & b_{1} \\ A_{1,2} & A_{2,2} & b_{2} \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \\ 1 \end{pmatrix} = \begin{pmatrix} x' \\ y' \\ 1 \end{pmatrix}. The Euclidean transformations are the affine transformations such that the 2×2 matrix of the A_{i,j} is
orthogonal. The augmented matrix that represents the
composition of two affine transformations is obtained by multiplying their augmented matrices. Some affine transformations that are not Euclidean transformations have received specific names.
Scaling An example of an affine transformation which is not Euclidean is given by scaling. To make a figure larger or smaller is equivalent to multiplying the Cartesian coordinates of every point by the same positive number
m. If are the coordinates of a point on the original figure, the corresponding point on the scaled figure has coordinates (x',y') = (m x, m y). If
m is greater than 1, the figure becomes larger; if
m is between 0 and 1, it becomes smaller.
Shearing A
shearing transformation will push the top of a square sideways to form a
parallelogram. Horizontal shearing is defined by: (x',y') = (x+y s, y) Shearing can also be applied vertically: (x',y') = (x, x s+y) ==Orientation and handedness==