page_title: Shear mapping
section_title: Horizontal and vertical shear of the plane
hierarchical_section_title: Shear mapping / Definition / Horizontal and vertical shear of the plane
context_page_description: In plane geometry, a shear mapping is a linear map that displaces each point in fixed direction, by an amount proportional to its signed distance from the line that is parallel to that direction and goes through the origin. This type of mapping is also called shear transformation, transvection, or just shearing.
  An example is the mapping that takes any point with coordinates to the point. In this case, the displacement is horizontal, the fixed line is the -axis, and the signed distance is the coordinate. Note that points on opposite sides of the reference line are displaced in opposite directions.
  Shear mappings must not be confused with rotations. Applying a shear map to a set of points of the plane will change all angles between them, and the length of any line segment that is not parallel to the direction of displacement. Therefore it will usually distort the shape of a geometric figure, for example turning squares into non-square parallelograms, and circles into ellipses. However a shearing does preserve the area of geometric figures and the alignment and relative distances of collinear points.
context_section_description: In the plane , a horizontal shear (or shear parallel to the x axis) is a function that takes a generic point with coordinates  to the point ; where  is a fixed parameter, called the shear factor.
  The effect of this mapping is to displace every point horizontally by an amount proportionally to its  coordinate.  Any point above the -axis is displaced to the right (increasing ) if , and to the left if . Points below the -axis move in the opposite direction, while points on the axis  stay fixed.
  Straight lines parallel to the -axis remain where they are, while all other lines are turned, by various angles, about the point where they cross the -axis.  Vertical lines, in particular, become oblique lines with slope . Therefore the shear factor  is the cotangent of the angle  by which the vertical lines tilt, called the shear angle.
  If the coordinates of a point are written as a column vector (a 2×1 matrix), the shear mapping can be written as multiplication by a 2×2 matrix:
  A vertical shear (or shear parallel to the -axis) of lines is similar, except that the roles of  and  are swapped. It corresponds to multiplying the coordinate vector by the transposed matrix:
  The vertical shear displaces points to the right of the -axis up or down, depending on the sign of .  It leaves vertical lines invariant, but tilts all other lines about the point where they meet the -axis.  Horizontal lines, in particular, get tilted by the shear angle  to become lines with slope .
caption: Through a shear mapping coded in SVG,
  a rectangle becomes a parallelogram.