ShearingMatrix
✖
ShearingMatrix
gives the matrix corresponding to shearing by θ radians along the direction of the vector v, and normal to the vector n.
Details

- ShearingMatrix gives matrices corresponding to shearing with the origin kept fixed.
- ShearingMatrix gives matrices with determinant 1, corresponding to area- or volume-preserving transformations.
- In 2D, ShearingMatrix turns rectangles into parallelograms. ShearingMatrix[θ,{1,0},{0,1}] effectively slants by angle θ to the right.
- In 3D, ShearingMatrix does the analog of shearing a deck of cards by angle θ in the direction v, with the cards being oriented so as to have normal vector n.
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (5)Survey of the scope of standard use cases

https://wolfram.com/xid/0dczko9v3s0i-bsjgcs


https://wolfram.com/xid/0dczko9v3s0i-hrfth

Shearing in the plane along the
axis:

https://wolfram.com/xid/0dczko9v3s0i-b0ll0q

Shearing the plane along the
axis:

https://wolfram.com/xid/0dczko9v3s0i-cgmoz

A shearing by angle in the
direction in the line
:

https://wolfram.com/xid/0dczko9v3s0i-rx9kx

Transformation applied to a 2D shape:

https://wolfram.com/xid/0dczko9v3s0i-g7xt0l

https://wolfram.com/xid/0dczko9v3s0i-crv30x

Transformation applied to a 3D shape:

https://wolfram.com/xid/0dczko9v3s0i-gc95ov

https://wolfram.com/xid/0dczko9v3s0i-c1y145

Applications (2)Sample problems that can be solved with this function
Applying the transformation to a surface:

https://wolfram.com/xid/0dczko9v3s0i-egoo10

Generate all simple (directions parallel to axes) shearing matrices for dimension n:

https://wolfram.com/xid/0dczko9v3s0i-fziujs

https://wolfram.com/xid/0dczko9v3s0i-b5hbl9


https://wolfram.com/xid/0dczko9v3s0i-bicbny


https://wolfram.com/xid/0dczko9v3s0i-jinfgw


https://wolfram.com/xid/0dczko9v3s0i-cge62c


https://wolfram.com/xid/0dczko9v3s0i-bcmoyv

Properties & Relations (4)Properties of the function, and connections to other functions
The determinant of a shearing matrix is 1; hence it preserves areas and volumes:

https://wolfram.com/xid/0dczko9v3s0i-do8h5e

The inverse of ShearingMatrix[θ,v,n] is given by ShearingMatrix[-θ,v,n]:

https://wolfram.com/xid/0dczko9v3s0i-dlcly9

The inverse of ShearingMatrix[θ,v,n] is also given by ShearingMatrix[θ,-v,n]:

https://wolfram.com/xid/0dczko9v3s0i-ecu4ee

The power of a shearing matrix is again a shearing matrix with the same
and
:

https://wolfram.com/xid/0dczko9v3s0i-b8sfdk

Possible Issues (3)Common pitfalls and unexpected behavior
The order in which shearings are applied is significant:

https://wolfram.com/xid/0dczko9v3s0i-bawjb1
Here the two different orders do not yield the same matrix:

https://wolfram.com/xid/0dczko9v3s0i-erq30a

The transformation is not defined for angles such that
:

https://wolfram.com/xid/0dczko9v3s0i-bu0g5k

For non-orthogonal vectors, the direction is determined by the projection of the direction vector:

https://wolfram.com/xid/0dczko9v3s0i-glanwq

Wolfram Research (2007), ShearingMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ShearingMatrix.html.
Text
Wolfram Research (2007), ShearingMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ShearingMatrix.html.
Wolfram Research (2007), ShearingMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ShearingMatrix.html.
CMS
Wolfram Language. 2007. "ShearingMatrix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ShearingMatrix.html.
Wolfram Language. 2007. "ShearingMatrix." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ShearingMatrix.html.
APA
Wolfram Language. (2007). ShearingMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ShearingMatrix.html
Wolfram Language. (2007). ShearingMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ShearingMatrix.html
BibTeX
@misc{reference.wolfram_2025_shearingmatrix, author="Wolfram Research", title="{ShearingMatrix}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ShearingMatrix.html}", note=[Accessed: 05-June-2025
]}
BibLaTeX
@online{reference.wolfram_2025_shearingmatrix, organization={Wolfram Research}, title={ShearingMatrix}, year={2007}, url={https://reference.wolfram.com/language/ref/ShearingMatrix.html}, note=[Accessed: 05-June-2025
]}