0

Please, how to make these two curly brackets in an array?

enter image description here

enter image description here

Edit:

I just took liberty to glue the two half images above.

enter image description here

4
  • Do you also want the two asymmetric moustaches? ;o)
    – Bernard
    Jul 28, 2017 at 20:38
  • ^_^ Sorry, I need the two curly brackets without moustaches.
    – Ahmed
    Jul 28, 2017 at 20:41
  • I meant the broken outer parentheses.
    – Bernard
    Jul 28, 2017 at 20:58
  • These are parts of the array parentheses.
    – Ahmed
    Jul 28, 2017 at 21:00

3 Answers 3

5

Something like this?

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{mathtools, bigstrut}

\begin{document}

\[ \begin{pmatrix}
    \bigstrut[t] 0 & & & & & 0 \\[-0.5ex]
     \vdots & & & \raisebox{0.35ex}[0pt][0pt]{$ \begin{rcases}0\\[-1ex] \vdots within{0} \\[-0.75ex]0\end{rcases}\left\lfloor\frac{i}{2}\right\rfloor $} &
                   & \vdots \\
    0 & & & & & 0 \\
     \vdots \\[-1.5ex]
     \vdots \\
    0 & & & & & \raisebox{0.35ex}[0pt]{$\left\lfloor\frac{i}{2}\right\rfloor \begin{cases}0\\[-1ex] \vdots within{0} \\[-0.75ex]0\end{cases}\hspace{-1em}$}
  \end{pmatrix} \]


\end{document} 

enter image description here

To have the 0s in the last column aligned, you can use the pmatrix* environment (defined by mathtools) with option[r], as mentioned by @Mico. However this will have the effect that all columns will be right-aligned, which might be unwanted (for instance a 0 in the second column, last row, would require a left alignment), or use \llap for this specific element:

\[ \begin{pmatrix}
    \bigstrut[t] 0 & & & & & 0 \\[-0.5ex]
      \vdots & & & \raisebox{0.35ex}[0pt][0pt]{$ \begin{rcases}0\\[-1ex] \vdotswithin{0} \\[-0.75ex]0\end{rcases}\left\lfloor\frac{i}{2}\right\rfloor $} &
                    & \vdots \\
    0 & & & & \qquad & 0 \\
      \vdots \\[-1.5ex]
      \vdots \\
    0 & & & & \qquad & \raisebox{0.35ex}[0pt]{\llap{$\left\lfloor\frac{i}{2}\right\rfloor \begin{cases}0\\[-1ex] \vdotswithin{0} \\[-0.75ex]0\end{cases}$\hspace{-1.4em}}}
  \end{pmatrix} \]

enter image description here

3
  • In the third column. The zeros should be under each other.
    – Ahmed
    Jul 29, 2017 at 1:23
  • 1
    @Ahmed - Just change \begin{pmatrix} to \begin{pmatrix*}[r], \end{pmatrix} to \end{pmatrix*}, and (while you're at it) both instances of \vdots within to \vdotswithin.
    – Mico
    Jul 29, 2017 at 5:47
  • 2
    @Ahmed: I hadn't seen your updated image. Mico's solution is the right solution if you want all columns to be right-aligned
    – Bernard
    Jul 29, 2017 at 10:24
5

Among other options, nested arrays could be used for building this big array. The curly braces can be written as \Biggl\{ and \Biggr\}, both from amsmath package. For more than three rows, \Biggl and \Biggr will not be large enough and one will resort to \left and \right. In the latter case, you need to prepend/append all other arrays with \left./\right. to fix horizontal alignment.

\documentclass[12pt]{article}
\usepackage{amsmath}    
\begin{document}

\setlength{\arraycolsep}{1.5em}
\[\left(
\begin{array}{@{}lr@{}} 
    \begin{array}{@{}cc@{}} 
      0  &  0  \\
      \vdots  &  \vdots  \\
      0  &  0 
    \end{array}\Biggr\}\left\lceil\frac i2\right\rceil
    &
    \begin{array}{@{}c@{}} 
      0  \\  \vdots  \\  0       
    \end{array}
    \\  &  \\
    \begin{array}{@{}c@{}} 
      \vdots \\  \\  0       
    \end{array} & \left\lfloor\frac i2\right\rfloor 
    \Biggl\{\begin{array}{@{}c@{}} 
      0  \\  \vdots  \\  0 
    \end{array}
\end{array}
\right)
\]

\end{document}

enter image description here

Another possibility:

\setlength{\arraycolsep}{2em}
\newcommand{\lbrce}{\smash{\left.\rule{0pt}{25pt}\right\}}} 
\newcommand{\rbrce}{\smash{\left\{\rule{0pt}{25pt}\right.}} 
\newcommand{\sdots}{\smash{\vdots}}    
\[
 \begin{pmatrix}
  0      & 0 & 0 \\
  \sdots & \sdots\makebox[0pt][l]{$\lbrce\left\lceil\frac i2\right\rceil$} & \sdots \\
  0      & 0 &   \\
         &   & 0 \\
         &   & \makebox[0pt][r]{$\left\lfloor\frac i2\right\rfloor\rbrce$}\sdots \\
  0      &   & 0
 \end{pmatrix}
\]

enter image description here

1
  • Although the inner braces don't enclose completely their content as in Bernard's answer.
    – skpblack
    Jul 29, 2017 at 12:24
2

Here is a possible implementation without unnecessary spaces:

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
% local command
\newcommand{\zerocol}{\begin{matrix}0\\\vdots\\0\end{matrix}}
\begin{pmatrix}
\zerocol & & \zerocol
 & \kern-\nulldelimiterspace\kern-2\arraycolsep
   \left.\vphantom{\zerocol}\right\rbrace\left\lceil\frac{i}{2}\right\rceil
 & \zerocol
\\
\zerocol & & &
  \left\lfloor\frac{i}{2}\right\rfloor\left\lbrace\vphantom{\zerocol}\right.
  \kern-\nulldelimiterspace\kern-2\arraycolsep
& \zerocol
\end{pmatrix}
\]

\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .