[Tex/LaTex] Correct alignment of multiple-line inequality

equationshorizontal alignmentmath-mode

I want to display a set of inequalities to look like the code below

  this is the lower bound
≤ this is the thing to be bounded
≤ this is the upper bound

My attempt to do this is the following:

\documentclass{article}

\usepackage{amsmath}

\begin{document}
\begin{align*}
  &\phantom{\leq} \text{this is the lower bound} \\
  & \leq \text{this is the thing to be bounded} \\
  & \leq \text{this is the upper bound}
\end{align*}
\end{document}

Unfortunately, in the output, the first line is not quite aligned with the second and third lines, it starts a little bit earlier than desired.

output of code above

I have two questions:

  1. Why doesn't the \phantom command do what I think it is supposed to?
  2. How do I get the desired output?

Best Answer

To get the proper alignment using the \phantom method, you need to write \phantom{{}\leq{}} rather than just \phantom{\leq}. Providing the empty "math atoms", {}, around \leq informs TeX that it should treat \leq as an object of type mathrel ("relational operator") rather than of type mathord ("ordinary math item").

You can also get the desired alignment without a \phantom. Just (i) place the alignment symbol (&) immediately before the \text{...} instructions on all three lines and (ii) insert {} between \leq and &\text{...} on lines 2 and 3.

enter image description here

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
  &\phantom{{}\leq{}} \text{this is the lower bound} \\
  & \leq \text{this is the thing to be bounded} \\
  & \leq \text{this is the upper bound}
\end{align*}

\begin{align*}
         &\text{this is the lower bound} \\
  \leq{} &\text{this is the thing to be bounded} \\
  \leq{} &\text{this is the upper bound}
\end{align*}
\end{document}