1

My code is

    A = \left[\begin{matrix}
        1&\underbrace{\begin{matrix}
            1&\dotsb&1
        \end{matrix}}_N
    \end{matrix}\right]

and the outcome is enter image description here

but I want the following outcome

enter image description here

How can I get this?

Skillmon
  • 60,462
  • Welcome to the site. Search is your friend. Try "underbrace matrix" leads to answers like https://tex.stackexchange.com/questions/182749/underbrace-matrix-inside-brackets. There are many other possibilities, as well. – Steven B. Segletes Dec 05 '19 at 11:48

1 Answers1

1

Use \smash to hide the height of the \underbrace part. You can also drop the brackets, \left[ and \right], and use bmatrix or simply just [ .. ] around a matrix.

\documentclass{article}
\usepackage{amsmath}

\begin{document}

\[
A = \begin{bmatrix}
    1&\smash{\underbrace{\begin{matrix}
        1&\dotsb&1
    \end{matrix}}_N}
\end{bmatrix}
\]

\end{document}

enter image description here

PS: The idea is the same as in the link provided by @StevenB.Segletes, I wrote the answer before searching ..

AboAmmar
  • 46,352
  • 4
  • 58
  • 127