Vector Reflection Calculator

Reflect any vector across a chosen boundary fast. Supports 2D lines and 3D planes accurately. Download tables, PDFs, and CSV for your records securely.

Calculator

Choose the space for your vectors.
Normal works in 2D and 3D.
Controls rounding in displayed results.

Normal-based reflection uses a line (2D) or plane (3D) passing through the origin.

Example data table

CaseDimensionMethodvNormal/DirectionReflected r
13DAcross normal (3, −2, 1) n = (0, 1, 0) (3, 2, 1)
22DAcross direction (2, 1) d = (1, 0) (2, −1)
32DAcross normal (1, 4) n = (1, 1) (4, 1)
These examples reflect across boundaries passing through the origin.

Formula used

Across a line or plane with unit normal n̂
r = v − 2(v·n̂)n̂
The component along the normal flips sign, while the tangent component stays unchanged.
Across a 2D line through the origin with unit direction u
r = 2(v·u)u − v
This mirrors v across the axis defined by u.

How to use this calculator

  1. Select 2D or 3D to match your vectors.
  2. Choose normal-based reflection for lines or planes.
  3. For 2D axis reflection, choose the direction method.
  4. Enter the vector components for v and the boundary vector.
  5. Keep auto-normalize enabled unless you provide unit vectors.
  6. Press Submit to show results above the form.
  7. Use the download buttons to export your results.

Reflection as a geometric transform

Vector reflection flips a vector across a boundary while preserving its distance from the origin. For a line in 2D or a plane in 3D that passes through the origin, reflection is a rigid transform: lengths are preserved and angles to the boundary are mirrored. In practice, the calculator will often show ‖r‖ = ‖v‖ within the chosen rounding precision.

Normal-based calculation details

The primary method uses r = v − 2(v·n̂)n̂, where n̂ is the unit normal to the boundary. The dot product v·n̂ is the signed normal component. Decomposing v into v = v⊥ + v∥ with v⊥ = (v·n̂)n̂ and v∥ tangent to the boundary, reflection keeps v∥ unchanged and replaces v⊥ with −v⊥. This means r·n̂ = −(v·n̂) and r − v is always parallel to n̂.

Direction-based line reflection in 2D

When a 2D line through the origin is given by unit direction u, the tool applies r = 2(v·u)u − v. Here v·u is the scalar projection onto the line, and 2(v·u)u is twice the parallel component. Subtracting v swaps the perpendicular component’s sign. For example, reflecting (2, 1) across the x-axis direction u = (1, 0) yields (2, −1).

Normalization, precision, and stability

Correct reflection requires unit vectors. With auto-normalize enabled, n̂ = n/‖n‖ or u = d/‖d‖ is computed first, preventing scale distortions. If you supply a non-unit normal without normalization, the reflected vector would be incorrect unless you used the scaled form r = v − 2(v·n)/(n·n)n. Precision from 0–12 decimals controls presentation and helps compare near-parallel cases where v·n̂ is small.

Practical interpretation and validation

Use the result table to validate behavior: the magnitude should stay consistent, and the dot value should reverse sign for normal reflection. These checks are common in physics (bounce directions), robotics (mirror trajectories), and graphics (symmetry operations). Exporting CSV and PDF supports lab notes, classroom worksheets, and reproducible calculations for reviews. If the result seems unexpected, verify the boundary vector is not zero and that the chosen method matches your interpretation of the mirror. Switching from normal to direction in 2D can change the reference boundary substantially in real applications.

FAQs

What boundary does the calculator reflect across?

It reflects across a line (2D) or a plane (3D) that passes through the origin. You define the boundary using a normal vector for line/plane reflection, or a direction vector for a 2D axis reflection.

Do I need to enter a unit normal or unit direction?

No. If auto-normalize is enabled, the calculator converts your normal or direction into a unit vector before computing reflection. Disable it only when you are sure your boundary vector already has length one.

Can this reflect across a line or plane not through the origin?

Not directly. For an offset boundary, translate your vector by subtracting a point on the line or plane, perform the reflection, then translate back by adding the same point.

Why is direction-based reflection limited to 2D?

A single direction uniquely defines a mirror axis in 2D. In 3D, a direction alone does not define a unique mirror plane; you would also need additional constraints, so the tool uses the normal-based method instead.

What does the dot value tell me?

The dot value is the signed component of v along the unit normal or unit direction. For normal reflection, the sign should flip because r·n̂ equals −(v·n̂), while the tangential component stays the same.

Why might ‖r‖ differ from ‖v‖?

Reflection preserves length mathematically, but displayed rounding can introduce small differences. Length can also appear inconsistent if the boundary vector is zero, not normalized when required, or if inputs contain extremely large or tiny magnitudes.

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.