6

I have the following expression:

\begin{equation}
\begin{aligned}
%C1
\sum_{i = 1}^{m}{y^{C_1}_i} &= m\beta_0^{C_1} + \beta_1^{C_1}\sum_{i = 1}^{m}{x_{i1}^{C_1}} + \cdots + \beta_q^{C_1}\sum_{i = 1}^{m}{x_{iq}^{C_1}}\\
\sum_{i = 1}^{m}{y^{C_1}_ix_{i1}^{C_1}} &= \beta_0^{C_1}\sum_{i = 1}^{m}{x_{i1}^{C_1}} + \beta_1^{C_1}\sum_{i = 1}^{m}{(x_{i1}^{C_1})^2} + \cdots + \beta_q^{C_1}\sum_{i = 1}^{m}{x_{iq}^{C_1}x_{i1}^{C_1}}\\
&\vdots\\
\sum_{i = 1}^{m}{y^{C_1}_ix_{iq}^{C_1}} &= \beta_0^{C_1}\sum_{i = 1}^{m}{x_{iq}^{C_1}} + \beta_1^{C_1}\sum_{i = 1}^{m}{x_{i1}^{C_1}x_{iq}^{C_1}} + \cdots + \beta_q^{C_1}\sum_{i = 1}^{m}{(x_{iq}^{C_1})^2}\\
%C2
\sum_{i = 1}^{m}{y^{C_2}_i} &= m\beta_0^{C_2} + \beta_1^{C_2}\sum_{i = 1}^{m}{x_{i1}^{C_2}} + \cdots + \beta_q^{C_2}\sum_{i = 1}^{m}{x_{iq}^{C_2}}\\
\sum_{i = 1}^{m}{y^{C_2}_ix_{i1}^{C_2}} &= \beta_0^{C_2}\sum_{i = 1}^{m}{x_{i1}^{C_2}} + \beta_1^{C_2}\sum_{i = 1}^{m}{(x_{i1}^{C_2})^2} + \cdots + \beta_q^{C_2}\sum_{i = 1}^{m}{x_{iq}^{C_2}x_{i1}^{C_2}}\\
&\vdots\\
\sum_{i = 1}^{m}{y^{C_2}_ix_{iq}^{C_2}} &= \beta_0^{C_2}\sum_{i = 1}^{m}{x_{iq}^{C_2}} + \beta_1^{C_2}\sum_{i = 1}^{m}{x_{i1}^{C_2}x_{iq}^{C_2}} + \cdots + \beta_q^{C_2}\sum_{i = 1}^{m}{(x_{iq}^{C_2})^2}\\
%R
\sum_{i = 1}^{m}{y^{R}_i} &= m\beta_0^{R} + \beta_1^{R}\sum_{i = 1}^{m}{x_{i1}^{R}} + \cdots + \beta_q^{R}\sum_{i = 1}^{m}{x_{iq}^{R}}\\
\sum_{i = 1}^{m}{y^{R}_ix_{i1}^{R}} &= \beta_0^{R}\sum_{i = 1}^{m}{x_{i1}^{R}} + \beta_1^{R}\sum_{i = 1}^{m}{(x_{i1}^{R})^2} + \cdots + \beta_q^{R}\sum_{i = 1}^{m}{x_{iq}^{R}x_{i1}^{R}}\\
&\vdots\\
\sum_{i = 1}^{m}{y^{R}_ix_{iq}^{R}} &= \beta_0^{R}\sum_{i = 1}^{m}{x_{iq}^{R}} + \beta_1^{R}\sum_{i = 1}^{m}{x_{i1}^{R}x_{iq}^{R}} + \cdots + \beta_q^{R}\sum_{i = 1}^{m}{(x_{iq}^{R})^2}
\end{aligned}
\label{eq:normals_equations}
\end{equation}

and I want to place brace of this form:

enter image description here Thank you so much!

0
7

The basic building block you can use is

\left\{
  \begin{aligned}
     ....
  \end{\aligned}
\right.

If you want the q+1 in front then just write it before the \left\{. You want three such groups on separate lines apparently with one single equation number, so you can place these groups in to

\begin{equation}
   \begin{gathered}
      ...\\
      ---\\
   \end{gathered}
\end{equation}

giving

Sample output

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
  \begin{gathered}
    \left\{
      \begin{aligned}
        % C1
        \sum_{i=1}^{m}{y^{C_1}_i}
        &= m\beta_0^{C_1}
        + \beta_1^{C_1}\sum_{i=1}^{m}{x_{i1}^{C_1}} + \dots
        + \beta_q^{C_1}\sum_{i=1}^{m}{x_{iq}^{C_1}}\\
        \sum_{i=1}^{m}{y^{C_1}_ix_{i1}^{C_1}}
        &= \beta_0^{C_1}\sum_{i=1}^{m}{x_{i1}^{C_1}}
        + \beta_1^{C_1}\sum_{i=1}^{m}{(x_{i1}^{C_1})^2} + \dots
        + \beta_q^{C_1}\sum_{i=1}^{m}{x_{iq}^{C_1}x_{i1}^{C_1}}\\
        &\vdots\\
        \sum_{i=1}^{m}{y^{C_1}_ix_{iq}^{C_1}}
        &= \beta_0^{C_1}\sum_{i=1}^{m}{x_{iq}^{C_1}}
        + \beta_1^{C_1}\sum_{i=1}^{m}{x_{i1}^{C_1}x_{iq}^{C_1}}
        + \dots + \beta_q^{C_1}\sum_{i=1}^{m}{(x_{iq}^{C_1})^2}\\
      \end{aligned}
    \right.\\
    % C2
    \left\{
      \begin{aligned}
        \sum_{i=1}^{m}{y^{C_2}_i}
        &= m\beta_0^{C_2}
        + \beta_1^{C_2}\sum_{i=1}^{m}{x_{i1}^{C_2}} + \dots
        + \beta_q^{C_2}\sum_{i=1}^{m}{x_{iq}^{C_2}}\\
        \sum_{i=1}^{m}{y^{C_2}_ix_{i1}^{C_2}}
        &= \beta_0^{C_2}\sum_{i=1}^{m}{x_{i1}^{C_2}}
        + \beta_1^{C_2}\sum_{i=1}^{m}{(x_{i1}^{C_2})^2} + \dots
        + \beta_q^{C_2}\sum_{i=1}^{m}{x_{iq}^{C_2}x_{i1}^{C_2}}\\
        &\vdots\\
        \sum_{i=1}^{m}{y^{C_2}_ix_{iq}^{C_2}}
        &= \beta_0^{C_2}\sum_{i=1}^{m}{x_{iq}^{C_2}}
        + \beta_1^{C_2}\sum_{i=1}^{m}{x_{i1}^{C_2}x_{iq}^{C_2}}
        + \dots + \beta_q^{C_2}\sum_{i=1}^{m}{(x_{iq}^{C_2})^2}\\
      \end{aligned}
    \right.\\
    % R
    \left\{
      \begin{aligned}
        \sum_{i=1}^{m}{y^{R}_i}
        &= m\beta_0^{R} + \beta_1^{R}\sum_{i=1}^{m}{x_{i1}^{R}}
        + \dots + \beta_q^{R}\sum_{i=1}^{m}{x_{iq}^{R}}\\
        \sum_{i=1}^{m}{y^{R}_ix_{i1}^{R}}
        &= \beta_0^{R}\sum_{i=1}^{m}{x_{i1}^{R}}
        + \beta_1^{R}\sum_{i=1}^{m}{(x_{i1}^{R})^2} + \dots
        + \beta_q^{R}\sum_{i=1}^{m}{x_{iq}^{R}x_{i1}^{R}}\\
        &\vdots\\
        \sum_{i=1}^{m}{y^{R}_ix_{iq}^{R}}
        &= \beta_0^{R}\sum_{i=1}^{m}{x_{iq}^{R}}
        + \beta_1^{R}\sum_{i=1}^{m}{x_{i1}^{R}x_{iq}^{R}}
        + \dots + \beta_q^{R}\sum_{i=1}^{m}{(x_{iq}^{R})^2}
      \end{aligned}
    \right.
    \label{eq:normals_equations}
  \end{gathered}
\end{equation}

\end{document}

I have changed your \cdots to \dots since amsmath knows which dots to use between + plus signs.

You might consider using \vdotswithin{=} from the mathtools package to get the vertical dots to be centered on the equals signs.

If you want to align the various elements vertically across groups, see Aligning across 'aligned' equation blocks

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.