Skip to main content

Ray Matrix Calculator

Build optical systems element by element. Compute the system ABCD matrix, effective focal length, back and front focal distances, and trace rays through the system.

The ABCD (ray transfer) matrix method traces paraxial rays through optical systems by representing each element — lens, free-space propagation, mirror, interface — as a 2×2 matrix. Multiplying element matrices in order yields the system matrix, from which the effective focal length, principal plane positions, and back/front focal distances can be read directly. This tool builds the system matrix element by element and traces input rays through the cascade, reporting the output ray height and angle at each stage. It handles lenses, free space, flat and curved interfaces, and mirror reflections. Use this for multi-element system design, beam relay layout, and quick verification of paraxial ray paths before moving to full ray-trace software.

Optical System
Element Stack (light order)1/10
1.
mm
[1.0000, 0] [-0.0100, 1.0000]
System Matrix
A = 1.00000B = 0
C = -0.010000D = 1.00000
Determinant (AD − BC)
Should equal n_in/n_out (1.0 for systems in air)
1.00000
System Properties
Effective focal length
EFL = −1/C
100.000mm
Back focal distance
BFD = −A/C (from last surface)
100.000mm
Front focal distance
FFD = D/C (from first surface)
-100.000mm
Abridged Optics — Ray Matrix Calculator v1.0Elements are applied in order from first to last (light travel direction). The system matrix is the product M_N × ... × M₂ × M₁.

All information, equations, and calculations have been compiled and verified to the best of our ability. For mission-critical applications, we recommend independent verification of all values. If you find an error, please let us know.