My code is
A = \left[\begin{matrix}
1&\underbrace{\begin{matrix}
1&\dotsb&1
\end{matrix}}_N
\end{matrix}\right]
but I want the following outcome
How can I get this?
My code is
A = \left[\begin{matrix}
1&\underbrace{\begin{matrix}
1&\dotsb&1
\end{matrix}}_N
\end{matrix}\right]
but I want the following outcome
How can I get this?
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}
PS: The idea is the same as in the link provided by @StevenB.Segletes, I wrote the answer before searching ..