I want these equations to line up so that all variables and operators go straight down. I've tried a few different techniques but haven't been able to get it to work.
Nope:
\begin{align*}
x+y+z=1 \\
x+y+z=\frac{5}{2} \\
x+y+z=5
\end{align*}
fiddle.
Inside the equation environment, use the split environment to split the equations into smaller pieces, these smaller pieces will be aligned accordingly. The double backslash works as a newline character. Use the ampersand character & , to set the points where the equations are vertically aligned.
There are three ways to solve systems of linear equations in two variables: graphing. substitution method. elimination method.
There is a package systeme
for systems of linear equations with automatic alignment of the variables and values - it even detects the variables for you.
In the standard set-up use you would just write
\begin{equation*}
\systeme{
x+y+z = 1,
x+y+z = \frac{5}{2},
x+y+z = 5
}
\end{equation*}
or
\begin{equation*}
\systeme{
3x +7z = 20,
y - 17z = -3,
24x + 15y = 7
}
\end{equation*}
which may or may not suit your taste. The bracket can removed by specifying empty delimiters by preceding the \systeme
command with
\sysdelim..
(.
is an empty place holder, \sysdelim
needs two as it specifies a left and a right delimiter).
To make the fraction bigger you can use \dfrac
from the amsmath
package (which you are already loading), but then you have to help with the line spacing:
\documentclass{article}
\usepackage{amsmath,systeme}
\begin{document}
\begin{equation*}
\systeme{
x+y+z = 1,
x+y+z = \frac{5}{2},
x+y+z = 5
}
\end{equation*}
No delimeter, displaystyle fraction and line spacing
\begin{equation*}
\sysdelim..\systeme{
x+y+z = 1,
x+y+z = \dfrac{5}{2}\rule[-3ex]{0pt}{7ex},
x+y+z = 5
}
\end{equation*}
\end{document}
Alternatively extra spacing can be added between all lines via the command \syslineskipcoeff
which is a scaling factor:
\documentclass{article}
\usepackage{amsmath,systeme}
\begin{document}
No delimeter, displaystyle fraction and line spacing
\begin{equation*}
\sysdelim..\syslineskipcoeff{2}\systeme{
x+y+z = 1,
x+y+z = \dfrac{5}{2},
x+y+z = 5
}
\end{equation*}
\end{document}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With