This article includes a list ofgeneral references, butit lacks sufficient correspondinginline citations. Please help toimprove this article byintroducing more precise citations.(April 2025) (Learn how and when to remove this message) |


Inplane geometry, ashear mapping is anaffine transformation that displaces each point in a fixed direction by an amount proportional to itssigned distance from a givenlineparallel to that direction.[1]
This type of mapping is also calledshear transformation,transvection, or justshearing. The transformations can be applied with ashear matrix ortransvection, anelementary matrix that represents theaddition of a multiple of one row or column to another. Such amatrix may be derived by taking theidentity matrix and replacing one of the zero elements with a non-zero value.
An example is thelinear map that takes any point withcoordinates to the point. In this case, the displacement is horizontal by a factor of 2 where the fixed line is thex-axis, and the signed distance is they-coordinate. Note that points on opposite sides of the reference line are displaced in opposite directions.
Shear mappings must not be confused withrotations. Applying a shear map to a set of points of the plane will change allangles between them (exceptstraight angles), and the length of anyline 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 intoparallelograms, andcircles intoellipses. However a shearing does preserve thearea of geometric figures and the alignment and relative distances ofcollinear points. For fonts that do not implement true-italics, a shear mapping is the main difference between the upright andslanted (or italic) styles ofletters.
The same definition is used inthree-dimensional geometry, except that the distance is measured from a fixed plane. A three-dimensional shearing transformation preserves the volume of solid figures, but changes areas of plane figures (except those that are parallel to the displacement). This transformation is used to describelaminar flow of a fluid between plates, one moving in a plane above and parallel to the first.
In the generaln-dimensionalCartesian space the distance is measured from a fixedhyperplane parallel to the direction of displacement. This geometric transformation is alinear transformation of that preserves then-dimensionalmeasure (hypervolume) of any set.
This sectionneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources in this section. Unsourced material may be challenged and removed.(April 2025) (Learn how and when to remove this message) |

In the plane, ahorizontal shear (orshear parallel to thex-axis) is a function that takes a generic point with coordinates to the point; wherem is a fixed parameter, called theshear factor.
The effect of this mapping is to displace every point horizontally by an amount proportionally to itsy-coordinate. Any point above thex-axis is displaced to the right (increasingx) ifm > 0, and to the left ifm < 0. Points below thex-axis move in the opposite direction, while points on the axis stay fixed.
Straight lines parallel to thex-axis remain where they are, while all other lines are turned (by various angles) about the point where they cross thex-axis. Vertical lines, in particular, becomeoblique lines withslope Therefore, the shear factorm is thecotangent of theshear angle between the former verticals and thex-axis.[citation needed] In the example on the right the square is tilted by 30°, so the shear angle is 60°.
If the coordinates of a point are written as acolumn vector (a 2×1matrix), the shear mapping can be written asmultiplication by a 2×2 matrix:
Avertical shear (or shear parallel to they-axis) of lines is similar, except that the roles ofx andy are swapped. It corresponds to multiplying the coordinate vector by thetransposed matrix:
The vertical shear displaces points to the right of they-axis up or down, depending on the sign ofm. It leaves vertical lines invariant, but tilts all other lines about the point where they meet they-axis. Horizontal lines, in particular, get tilted by the shear angle to become lines with slopem.
Two or more shear transformations can be combined.
If two shear matrices are and
then their composition matrix iswhich also has determinant 1, so that area is preserved.
In particular, if, we have
which is apositive definite matrix.
A typical shear matrix is of the form
This matrix shears parallel to thex axis in the direction of the fourth dimension of the underlying vector space.
A shear parallel to thex axis results in and. In matrix form:
Similarly, a shear parallel to they axis has and. In matrix form:
In 3D space this matrix shears the YZ plane into the diagonal plane passing through these 3 points:
Thedeterminant will always be 1, as no matter where the shear element is placed, it will be a member of a skew-diagonal that also contains zero elements (as all skew-diagonals have length at least two) hence its product will remain zero and will not contribute to the determinant. Thus every shear matrix has aninverse, and the inverse is simply a shear matrix with the shear element negated, representing a shear transformation in the opposite direction. In fact, this is part of an easily derived more general result: ifS is a shear matrix with shear elementλ, thenSn is a shear matrix whose shear element is simplynλ. Hence, raising a shear matrix to a powern multiplies itsshear factor byn.
IfS is ann ×n shear matrix, then:
For avector spaceV andsubspaceW, a shear fixingW translates all vectors in a direction parallel toW.
To be more precise, ifV is thedirect sum ofW andW′, and we write vectors as
correspondingly, the typical shearL fixingW is
whereM is a linear mapping fromW′ intoW. Therefore inblock matrix termsL can be represented as
The following applications of shear mapping were noted byWilliam Kingdon Clifford:
The area-preserving property of a shear mapping can be used for results involving area. For instance, thePythagorean theorem has been illustrated with shear mapping[3] as well as the relatedgeometric mean theorem.
Shear matrices are often used incomputer graphics.[4][5][6]
An algorithm due toAlan W. Paeth usesa sequence of three shear mappings (horizontal, vertical, then horizontal again) to rotate adigital image by an arbitrary angle. The algorithm is very simple to implement, and very efficient, since each step processes only one column or one row ofpixels at a time.[7]
Intypography, normal text transformed by a shear mapping results inoblique type.[citation needed]
In pre-EinsteinianGalilean relativity, transformations betweenframes of reference are shear mappings calledGalilean transformations. These are also sometimes seen when describing moving reference frames relative to a "preferred" frame, sometimes referred to asabsolute time and space.[citation needed]
The term 'shear' originates fromphysics, used to describe acutting-like deformation in which parallel layers of material 'slide past each other'. More formally,shear force refers to unalignedforces acting on one part of abody in a specific direction, and another part of the body in the opposite direction.
Definition according to Weisstein.
Made usingGeoGebra. Drag the sliders to observe the shears.