# Vertical equivalent of \mathclap?

Is there a vertical equivalent of \mathclap, i.e. a command that will ,,crush part of a formula to height zero, allowing better alignment with other parts of the same formula?

To illustrate what I want to achieve, consider the following (largely made-up) MWE:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
A \begin{pmatrix}
x \\ y \\ z
\end{pmatrix}
& =
u \cdot \left( \text{some rather long term} \right) \\
& =
v \cdot \left( \text{another rather long term} \right) \\
& =
w \cdot \left( \text{a third rather long term} \right)
\end{align*}
\end{document}


which gives

whereas would I'd like to achieve is

(I personally think that's more readable; YMMV, of course).

Is this possible, and if so, how? I've done some superficial research but came up empty-handed.

• \smash? amsmath extends it to \smash[b], \smash[t], default is \smash[tb] – daleif Nov 11 at 14:02

The vertical equivalent of \mathclap{...} is \smash{...}. \smash is available in both PlainTeX and LaTeX.

If you load the amsmath package, you will also get \smash[b]{...} and \smash[t]{...}. These commands set the depth and height of their arguments to zero. (One could say that they're somewhat similar in function to \mathrlap and \mathllap. But not perfectly equivalent, for sure.)

For the case of your sample code, then, you will want to replace

A \begin{pmatrix} x \\ y \\ z \end{pmatrix}


with

A \smash[b]{\begin{pmatrix} x \\ y \\ z \end{pmatrix}}

• Perfect! Exactly what I was looking for, thank you. – chsk Nov 11 at 14:57