
\documentclass[12pt]{article}
  \usepackage{tikz}
  \pagestyle{empty}
  \setlength{\parindent}{0pt}

\begin{document}
$aa = bb$

$aa\tikz[overlay]\draw[red] (0pt,4.5ex) -- ++(0ex,-5ex); \mathrel{\phantom{=}} \tikz[overlay]\draw[red] (0pt,4.5ex) -- ++(0ex,-5ex);bb$

\bigskip

$x = a + b$

$x = a\tikz[overlay]\draw[red] (0pt,4.5ex) -- ++(0ex,-5ex); \mathbin{\phantom{+}} \tikz[overlay]\draw[red] (0pt,4.5ex) -- ++(0ex,-5ex);b$

\end{document}
