As @carlpett mentioned, LaTeX does not break lines in mathmode automatically. You have to tell it where to perform the breaking. And yes, extensible delimiters specified by \left
and \right
pairs need to be paired on the same line. A consolation is the use of \left.
and \right.
to be the "missing" pair on the left/right of another delimiter. However, this does not bode well if the contents between \left
and \right
are of different sizes between line breaks. For this, \vphantom{<stuff>}
prints a zero-width rectangle with height exactly that of <stuff>
. This way you can break equations the way you want to, and stretch the height of the extensible delimiters to match each other, even across lines.
A good example mixing all these ideas is contained in section 8.1.1 Braces over several lines (page 25) in Herbert Voß' mathmode
document.
Alternatively, foregoing the use of extensible delimiters, you could resize delimiters using any of the following: \big
, \bigg
, \Big
, \Bigg
, or \bigl
, \bigr
, \Bigl
, \Bigr
, \biggl
, \biggr
, \Biggl
and \Biggr
from the amsmath
package. Here is an example from the package documentation that highlights this:
\documentclass[12pt]{article}
\usepackage{amsmath}% http://ctan.org/pkg/amsmath
\begin{document}
\[
\left[\sum_i a_i\left|\sum_j x_{ij}\right|^p\right]^{1/p}
\quad \text{versus} \quad
\biggl[\sum_i a_i\Bigl\lvert\sum_j x_{ij}\Bigr\rvert^p\biggr]^{1/p}
\]
\end{document}
Using this code:
\begin{equation}
\omega=\lambda_{1}\Sigma^{-1} \mathbf{1}+\lambda_{2}\Sigma^{-1}\mu
\end{equation}
returns this output:
Only the \bf
command was exchanged with \mathbf
.
Best Answer
Your MWE can not work! For math expression you need math environment, for inline formulas
$ ... your math expression ...$
, for display formula (stand alone in text)\begin{equation} .... \end{equation}
for numbered equations and for non-numbered\[ ... \]
. For math environments exist other possibilities, which available with us packets asamsmath
etc.Also the formula is ill formed. Correct code is:
which gives: