# Thread: How to put a box around multiple equations on multiple lines?

1. ## How to put a box around multiple equations on multiple lines?

I want to put one box around 5 equations where each equation is on a separate line and the equations are aligned. Also, outside of the box and on the right side of the page (sort of center from the box, say five equations I like the label to be on the same line as the third equation) I would like a tag like (EUL).

Please help me understand the code too because simply telling me to "use BLAH BLAH BLAH" does not help me at all. Thanks.

2. ## Re: How to put a box around multiple equations on multiple lines?

Try this LaTeX code:

\begin{matrix} \begin{array}{|l|} \hline equation_1 \\ equation_2 \\ equation_3 \\ equation_4 \\ equation_5 \\ \hline \end{array} & (EUL) \end{matrix}

yields:

$\begin{matrix} \begin{array}{|l|} \hline equation_1 \\ equation_2 \\ equation_3 \\ equation_4 \\ equation_5 \\ \hline \end{array} & (EUL) \end{matrix}$

This is a 1x2 matrix with the first cell consisting of an array that has been defined with vertical and horizontal lines, and the second cell is the tag that you specified.

3. ## Re: How to put a box around multiple equations on multiple lines?

Alternatively:

\boxed{ \begin{aligned} a+b &= 3 \\ a &= 5 \\ 2a+3b &= c + 3 \end{aligned} } \qquad (EUL)

\boxed{\begin{aligned} a+b &= 3 \\ a &= 5 \\ 2a+3b &= c + 3 \end{aligned}} \qquad (EUL)

\boxed{...} puts a box around what's between the braces.
\begin{aligned}...\end{aligned} defines a stack of equations that are aligned.
The & in the equation specifies where to align it.
The \\ begins a new line for the next equation.
And \qquad puts some spacing in.

Latex also supports equation labels that align to the right, but that doesn't work on a forum. It works only in an actual latex document.