我想在同一个方程式系统中添加两个下括号和两个侧括号,如附图所示。我已经成功添加了下括号,但左右括号太长。此外,我无法添加侧括号。
我的代码是:
\documentclass{article} \usepackage{amsmath} \begin{document}
\begin{align}
\left\begin{array}{c c c c c c}
a_{11} & \cdots & a_{1m} & a_{1(m+1)} & \cdots & a_{1(2m)} \\
\vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\
a_{n1} & \cdots & a_{nm} & a_{n(m+1)} & \cdots & a_{n(2m)} \\
\multicolumn{3}{c}{\underbrace{\rule{2cm}{0pt}}_{A_{n}}}
& \multicolumn{3}{c}{\underbrace{\rule{3.5cm}{0pt}}_{A_{k}}}
\end{array}\right \times
\left(\begin{array}{c}
s_{1} \\
\vdots\\
s_{m} \\
s_{m+1} \\
\vdots \\
s_{2m}
\end{array}\right)
= z \end{align} \end{document}
有人知道怎么做吗?谢谢!
答案1
我用 替换了align
,equation
因为没有align
标签并且只有一个等式。
\documentclass{article}
\usepackage{amsmath}
\usepackage[usestackEOL]{stackengine}
\stackMath
\begin{document}
\begin{equation}
\left(
\vphantom{\begin{array}{c}a\\a\\a\\\end{array}}
\smash{\underbrace{\begin{array}{c c c }
a_{11} & \cdots & a_{1m} \\
\vdots & \ddots & \vdots \\
a_{n1} & \cdots & a_{nm}
\end{array}}_{A_n}}\,\,
\smash{\underbrace{\begin{array}{c c c }
a_{1(m+1)} & \cdots & a_{1(2m)} \\
\vdots & \ddots & \vdots \\
a_{n(m+1)} & \cdots & a_{n(2m)}
\end{array}}_{A_k}}
\right) \times
\left(\begin{array}{c}
s_{1} \\
\vdots\\
s_{m} \\
s_{m+1} \\
\vdots \\
s_{2m}
\end{array}\right)
\setstackgap{L}{1.2\normalbaselineskip}
\vcenter{\hbox{\stackunder[1pt]{%
\left.{\Centerstack{\\ \\}}\right\}\scriptstyle S_m%
}{
\left.{\Centerstack{\\ \\}}\right\}\scriptstyle S_k%
}}}
= z \end{equation}
\end{document}
答案2
你可能会这样做:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\underset{
\underbrace{
\hphantom{\begin{matrix}a_{1,m} & \cdots & a_{n,m}\end{matrix}}
}_{\displaystyle A_n}
\hspace{2\arraycolsep}
\underbrace{
\hphantom{\begin{matrix}a_{n+1,m} & \cdots & a_{n+k,m}\end{matrix}}
}_{\displaystyle A_k}
}{
\begin{pmatrix}
a_{1,1} & \cdots & a_{n,1} & a_{n+1,1} & \cdots & a_{n+k,1} \\
\vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\
a_{1,m} & \cdots & a_{n,m} & a_{n+1,m} & \cdots & a_{n+k,m}
\end{pmatrix}
}
\times
\begin{pmatrix}
s_{1} \\
\vdots\\
s_{m} \\
s_{m+1} \\
\vdots \\
s_{m+k}
\end{pmatrix}
\hspace{-0.5em}
\begin{matrix}
\left.\begin{matrix}
\vphantom{s_1}\\\vphantom{\vdots}\\\vphantom{s_m}
\end{matrix}\right\rbrace S_m \hfill
\\
\left.\begin{matrix}
\vphantom{s_{m+1}}\\\vphantom{\vdots}\\\vphantom{s_{m+k}}
\end{matrix}\right\rbrace S_k \hfill
\end{matrix}
= z
\]
\end{document}
但是,您应该考虑不同的呈现方式:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
\begin{pmatrix}\vphantom{\bigg|} A_n & A_k \end{pmatrix}
\begin{pmatrix} \vphantom{\bigg|} S_n \\ \vphantom{\bigg|} S_k \end{pmatrix}
=z
\]
where
\begin{align*}
A_n &=
\begin{pmatrix}
a_{1,1} & \cdots & a_{n,1} \\
\vdots & \ddots & \vdots \\
a_{1,m} & \cdots & a_{n,m}
\end{pmatrix}
& S_n &=
\begin{pmatrix}
s_{1} \\
\vdots\\
s_{m}
\end{pmatrix}
\\
A_k &=
\begin{pmatrix}
a_{n+1,1} & \cdots & a_{n+k,1} \\
\vdots & \ddots & \vdots \\
a_{n+1,m} & \cdots & a_{n+k,m}
\end{pmatrix}
& S_k &=
\begin{pmatrix}
s_{m+1} \\
\vdots \\
s_{m+k}
\end{pmatrix}
\end{align*}
\end{document}