gives the matrix that represents reflection of points in a mirror normal to the vector v.
ReflectionMatrix
gives the matrix that represents reflection of points in a mirror normal to the vector v.
Details and Options
- The reflection is in a mirror that goes through the origin.
- ReflectionMatrix works in any number of dimensions. In 2D it reflects in a line; in 3D it reflects in a plane.
- ReflectionMatrix supports the option TargetStructure, which specifies the structure of the returned matrix. Possible settings for TargetStructure include:
-
Automatic automatically choose the representation returned "Dense" represent the matrix as a dense matrix "Orthogonal" represent the matrix as an orthogonal matrix "Unitary" represent the matrix as a unitary matrix - ReflectionMatrix[…,TargetStructureAutomatic] is equivalent to ReflectionMatrix[…,TargetStructure"Dense"].
Examples
open all close allBasic Examples (2)
Scope (4)
Reflect along the vector
or equivalently in the plane given by
:
r = ReflectionMatrix[{1, 1, 1, 1}]Points in the reflection plane remain fixed:
r.{1, -1, 0, 0}Points outside the reflection plane get reflected in the plane:
r.{1, 1, 1, 1}Reflection matrix for symbolic unit vector {u,v}:
Simplify[ReflectionMatrix[{u, v}], Element[{u, v}, Reals] && u ^ 2 + v ^ 2 == 1]//MatrixFormVectors normal to {u,v} remain unchanged:
%.Cross[{u, v}] == Cross[{u, v}]//Simplify[#, u ^ 2 + v ^ 2 == 1]&Transformation applied to a 2D shape:
gr = {Rectangle[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0}]}, {Green, Point[{1, 1}]}};Graphics[{{Opacity[.35], Blue, gr}, GeometricTransformation[{Opacity[.85], Red, gr}, ReflectionMatrix[{2, 1}]]}]Transformation applied to a 3D shape:
gr = {Cuboid[], AbsolutePointSize[10], Opacity[1], {Magenta, Point[{0, 0, 0}]}, {Green, Point[{1, 1, 1}]}};Graphics3D[{{Opacity[.35], Blue, gr}, GeometricTransformation[{Opacity[.85], Red, gr}, ReflectionMatrix[{2, 1, 0}]]}, Boxed -> False]Options (1)
TargetStructure (1)
Return the reflection matrix as a dense matrix:
ReflectionMatrix[{1, 1}, TargetStructure -> "Dense"]Return the reflection matrix as an orthogonal matrix:
ReflectionMatrix[{1, 1}, TargetStructure -> "Orthogonal"]Return the reflection matrix as a unitary matrix:
ReflectionMatrix[{1, 1}, TargetStructure -> "Unitary"]Applications (1)
Properties & Relations (3)
The determinant of a reflection matrix is
:
Det[ ReflectionMatrix[{1, 1, 1}]]The inverse of a reflection matrix is the matrix itself:
ReflectionMatrix[{1, 1, 1}].ReflectionMatrix[{1, 1, 1}]Reflection can be thought of as a special case of scaling:
ReflectionMatrix[{1, 1, 1}] == ScalingMatrix[-1, {1, 1, 1}]Possible Issues (1)
Reflection changes the orientation of polygons:
gr = {FaceForm[Red, Blue], Polygon[{{0, 0, 0}, {1, 0, 0}, {0, 1, 0}}]};{Graphics3D[gr, PlotRange -> {-.1, .1}], Graphics3D[GeometricTransformation[gr, ReflectionMatrix[{0, 0, 1}]], PlotRange -> {-.1, .1}]}See Also
ReflectionTransform RotationMatrix OrthogonalMatrix UnitaryMatrix
Function Repository: RayTransferMatrix
Related Guides
Related Workflows
- Rotate, Pan and Zoom 3D Graphics
Text
Wolfram Research (2007), ReflectionMatrix, Wolfram Language function, https://reference.wolfram.com/language/ref/ReflectionMatrix.html (updated 2024).
CMS
Wolfram Language. 2007. "ReflectionMatrix." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/ReflectionMatrix.html.
APA
Wolfram Language. (2007). ReflectionMatrix. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ReflectionMatrix.html
BibTeX
@misc{reference.wolfram_2026_reflectionmatrix, author="Wolfram Research", title="{ReflectionMatrix}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/ReflectionMatrix.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_reflectionmatrix, organization={Wolfram Research}, title={ReflectionMatrix}, year={2024}, url={https://reference.wolfram.com/language/ref/ReflectionMatrix.html}, note=[Accessed: 13-June-2026]}