Shear Matrix Generator Calculator

Pick dimension, set shear factors, and preview matrices. Apply to vectors, see steps, and properties. Download clean reports and keep calculations organized always securely.

Calculator

Choose 2D or 3D shear matrix.
Controls display rounding and exports.
Helpful for learning and verification.

Used only when dimension is 2D.
Applies when using X-shear or Y-shear.
x′ = x + shx·y
y′ = shy·x + y

Used only when dimension is 3D.
Applies only in 3D single mode.
Sets one off-diagonal entry.

General 3D shear factors

A has 1s on the diagonal
x′ adds sh_xy·y
x′ adds sh_xz·z
y′ adds sh_yx·x
y′ adds sh_yz·z
z′ adds sh_zx·x
z′ adds sh_zy·y
These are used only when dimension is 3D and mode is General.
One point per line, comma-separated. Extra columns are ignored.
Reset
Precision note: When det(A) is near zero, inversion becomes unstable. Use the Decimals control for cleaner reports.

Formula used

A shear is a linear transformation that shifts one coordinate by a multiple of another.

2D shear (general)

  • Matrix: A = \begin{bmatrix}1 & shx \\ shy & 1\end{bmatrix}
  • Transform: x′ = x + shx·y, y′ = shy·x + y
  • Determinant: det(A) = 1 − shx·shy
  • Inverse (if det(A) ≠ 0): A^{-1} = (1/det)\begin{bmatrix}1 & −shx \\ −shy & 1\end{bmatrix}

3D shear (general)

  • Matrix: A = \begin{bmatrix}1 & sh\_xy & sh\_xz \\ sh\_yx & 1 & sh\_yz \\ sh\_zx & sh\_zy & 1\end{bmatrix}
  • Transform: [x′,y′,z′]^T = A·[x,y,z]^T
  • Determinant and inverse are computed using 3×3 cofactor expansion.

How to use this calculator

  1. Select Dimension (2D or 3D).
  2. Choose a mode (single factor for quick shears, or general for full control).
  3. Enter shear factor(s). For 2D, use k or shx/shy.
  4. Optionally paste points/vectors to transform, one per line.
  5. Click Generate Shear Matrix to view the matrix and properties.
  6. Use Download CSV or Download PDF to export results.

Example data table

Sample inputs and expected outputs for quick verification.

Case Dimension Factors Matrix Example point Transformed
1 2D X-shear k = 2 [[1,2],[0,1]] (1,3) (7,3)
2 2D General shx = 1.5, shy = 0.2 [[1,1.5],[0.2,1]] (2,4) (8,4.4)
3 3D Single x′ = x + 0.5·z [[1,0,0.5],[0,1,0],[0,0,1]] (2,1,6) (5,1,6)
If your result differs, check dimension, mode, and rounding.

What a shear matrix represents

A shear matrix is a linear operator that keeps the origin fixed and slides points parallel to an axis. In 2D, the off‑diagonal factors shx and shy describe how x changes with y and how y changes with x. With ones on the diagonal, the matrix introduces skew without direct scaling. This calculator builds the matrix from your chosen mode so you can verify coefficients before transforming vectors.

Choosing 2D or 3D models

In 2D, a single factor k produces a classic x‑shear or y‑shear, such as x′ = x + k·y. In 3D, the idea extends to dependencies between any pair of coordinates. The general 3D option exposes six factors, letting you model compound shears like x′ = x + sh_xy·y + sh_xz·z and compare results across configurations and test cases.

Determinant, invertibility, and volume

Properties summarize the geometry quickly. The trace is fixed at 2 in 2D and 3 in 3D here, so it mainly checks that the diagonal stayed at one. The determinant is crucial: it signals whether area/volume is preserved and whether the mapping is reversible. Many single‑factor shears have det(A)=1, meaning they preserve area/volume even while shapes skew and lengths change. A negative determinant would indicate orientation reversal.

Inverse and numerical stability

When det(A) is near zero, inversion is unstable or impossible. The calculator reports invertibility and provides the inverse only when the determinant is safely away from zero. In 2D, the inverse uses a simple 1/det(A) formula. In 3D, cofactor expansion is used; it works well for typical inputs but can magnify rounding error for very large shear factors. Use moderate values when validating homework or pipelines.

Practical uses and reporting workflow

Shear matrices appear in graphics, CAD drafting, simulation preprocessing, and decomposing affine transforms into basic steps. A practical workflow is to enter factors, test a few points, and export the result for documentation. CSV is convenient for spreadsheets and further computation, while PDF gives a compact record of the matrix, determinant, and transformed points. Keeping exports with project notes supports repeatable reviews. It simplifies future troubleshooting for teams.

FAQs

What is the difference between X-shear and Y-shear?

X-shear changes x using y (x′ = x + k·y). Y-shear changes y using x (y′ = y + k·x). Both keep the diagonal at one and skew shapes without translating the origin.

Does a shear matrix preserve area or volume?

Often yes. A single-factor shear typically has det(A)=1, so area/volume is preserved even though angles and lengths may change. In general mode, det(A) depends on the product of opposing shear factors.

When will the inverse be unavailable?

If det(A) is zero or extremely close to zero, the matrix is not invertible. The calculator will show “not invertible” and omit the inverse table to avoid misleading results.

Can I use negative shear factors?

Yes. Negative factors shear in the opposite direction, which is useful for reversing a skew or modeling mirrored offsets. Watch det(A): very large magnitudes can make inversion numerically unstable.

How do I format points for transformation?

Enter one point per line, comma-separated. Use “x,y” for 2D and “x,y,z” for 3D. Extra values after the required coordinates are ignored, and non-numeric lines are skipped.

What does the Decimals setting change?

It controls rounding in the displayed matrix, properties, transformed points, and exports. It does not change the internal calculation precision, but higher decimals can make small numerical differences easier to spot.

Related Calculators

Row Reduction RREF CalculatorDiagonalization Checker CalculatorLU Decomposition Steps CalculatorQR Decomposition Steps Calculatormatrix calculator with variablesGauss-Jordan inverse calculatorPolynomial linear independence calculatorLinear independence of matrix calculatorComplex matrix inverse calculatorQR decomposition least squares

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.