# Boxed equations

How do I place a boxed equation on the same line as other equations?

For example, I have a few equations on the left side of my page but then I want the boxed answer on the same line to the right.

One way would be to use \hfill.

Code...

\documentclass{amsart}
\begin{document}
$y=mx+b$\hfill$\boxed{a+b=c}$
\end{document}


Yields...

You can use the flalign* environment:

\documentclass{article}
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.3pt}
\usepackage{amsmath}

\begin{document}

\begin{flalign*}
& ax^2 + bx + c = 0 & & \boxed{x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}}
\end{flalign*}

\end{document}