# Problem in writing the system of equation in LaTeX

Here's the code I have and here's the system of equation it creates which is not working as desired. Do you know how I can fix it?

\item For what value of $b$ would the following system fo equations have an infinite number of solutions?\hfill
\begin{align*} 3x+5y &= 27 \\ 12x+20y &= 3b \end{align*}
\begin{enumerate}
\item $9$
\item $27$
\item $36$
\item $81$
\item $126$
\end{enumerate}


-
Don't add the outer $$s, then you'll be fine. Also see Why is $$ preferable to $$? for when a display math block is needed. – Werner May 20 '14 at 20:09

The package systeme is very handy for typesetting systems of equations. Note how not just the = symbol but also the variables x and y and the symbol + are aligned nicely without requiring any special user inputs (see the comment in my code).

\documentclass{article}
\usepackage{systeme} % see http://www.ctan.org/tex-archive/macros/generic/systeme
\begin{document}
\begin{enumerate}
\item For what value of $b$ would the following system of equations
have an infinite number of solutions?
$\sysdelim.. % no delimiter symbols on either side \systeme{ 5y+3x = 27 , % it will be automatically reordered as 3x+5y = 27 12x+20y = 3b}$
\begin{enumerate}
\item 9
\item 27
\item 36
\item 81
\item 126
\end{enumerate}
\end{enumerate}
\end{document}

-
@MoneyOrientedProgrammer - Thanks for the edit. – Mico May 21 '14 at 5:20
Thanks for accepting my edit. :-) – kiss my armpit May 21 '14 at 5:21

The align* environment (as well as align) is already a math environment, so you don't need to go into math mode before using align*. In fact, align* can not be used in math mode, but the "inner" math environments such as aligned can be.

## Code:

\documentclass{article}

\usepackage{amsmath}
\usepackage{enumitem}

\begin{document}
\begin{enumerate}
\item[55.] For what value of $b$ would the following system of equations have an infinite number of solutions?
\begin{align*}
3x+ 5y &=  27 \\
12x+20y &=  3b
\end{align*}
\begin{enumerate}
\item $9$
\item $27$
\item $36$
\item $81$
\item $126$
\end{enumerate}
\end{enumerate}
\end{document}

-
Did you test your code? When I am testing it , it doesn't become the same as yours! – Mona Jalal May 20 '14 at 21:12
@MonaJalal: Yes I did. The image is the output of the code as posted. Did you try the code exactly as I posted, or did you try it in your real use case? Perhaps you are using different packages, or have some custom settings? There is a reason why it is recommended that you post a fully compilable MWE including \documentclass and the appropriate reproduces the problem. Please provide more details and then perhaps we can figure out the problem. – Peter Grill May 20 '14 at 21:44

A suggestion to improve the below solution, unsing in-line enumerate* environment from the enumitem package, and empheq (that loads amsmath) to have a left brace before the system of equations:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{heuristica}
\usepackage[inline, shortlabels]{enumitem}

\begin{document}

\begin{enumerate}[start = 55]
\item For what value of $b$ would the following system fo equations have an infinite number of solutions?
\begin{align*}[left = \empheqlbrace]
3x+5y &= 27 \\
12x+20y &= 3b
\end{align*}
\begin{enumerate*}[afterlabel = ~~, itemjoin = {\hspace{1.5em}} ]
\item $9$
\item $27$
\item $36$
\item $81$
\item $126$.
\end{enumerate*}
\end{enumerate}

\end{document}


-