The following is a piece of LaTeX code displaying a function. But in the PDF file generated, the right curly bracket "}" does not show up at the end. If I replace \right\}
with just \}
, then the right bracket show up, but I want the larger one. One complication maybe that my equation is really long, so I had to break it up over multiple lines. Another problem I am having is that I want to line up my equation section, so I am using:
\subitem\space\space\space\space\space\space\space\space\space\space
\space\space\space\space\space\space\space\space \(` equation line `\) \\
There has to be a better way to do this.
Could anyone please point out to me how I can insert a large right curly bracket and have all the equation pieces line up based off of the left parenthesis "("?
Here's what I currently have:
And the code:
\documentclass[titlepage]{scrartcl}
\usepackage[utf8]{inputenc}
\setkomafont{disposition}{\normalfont\bfseries}
\usepackage{geometry}
\geometry{left=1in,right=1in,top=1in,bottom=1in}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{class}
\rhead{name}
\cfoot{\thepage} %center of the footer!
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\begin{document}
\begin{description}
\item[\space\space\space\space\space\space\space ii.]Calculate the covariance matrix of each class (\(\Sigma_{1}, \Sigma_{2}\)) manually.
\\ \\
answer:
\subitem \(\displaystyle \Sigma_{1} = \frac{1}{2-1}\left\{
\left(\left[\begin{array}{c} 0.80 \\ 1.2\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)
\left(\left[\begin{array}{c} 0.80 \\ 1.2\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)^{T} + \)
\subitem \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space \(
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)^{T} +
\right\}\)
\subitem \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space \(
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)^{T} +
\right\}\)
\subitem \space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space\space \(
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)
\left(\left[\begin{array}{c} 0.90 \\ 1.4\end{array}\right]-\left[\begin{array}{c} 1.0 \\ 1.375\end{array}\right]\right)^{T} \right\}\)
\end{description}
\end{document}
bmatrix
is defined by theamsmath
package, I recommend having a look through its manual to see what it can offer. As for what is missing: the preamble, i.e.\documentclass
and any required packages. Then adding\begin{document}
and\end{document}
will allow others to copy-paste the code and compile it without making any modifications.{}
button.