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

• May 29th 2013, 07:41 AM
mathguy25
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.
• May 29th 2013, 08:05 AM
ebaines
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:

$\displaystyle \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.
• May 29th 2013, 01:49 PM
ILikeSerena
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)

\displaystyle \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.