The matrix is used to restore the anatomical shape and proximal contacts of a tooth during a restoration. It consists of a matrix band and retainer. For amalgam, the Tofflemire matrix or AutoMatrix are commonly used, while for composites, plastic strip, shell, or sectional matrices are used. Wedges are used to secure the matrix band in place and prevent overhangs of filling material. Different matrix types and retainers are selected based on the material and type of restoration being performed.