分块矩阵
\begin{equation*}
\begin{array}{c@{\hspace{-5pt}}l}
\left(\begin{array}{ccc:ccc}
a&\cdots &a &b &\cdots&b\\
&\ddots &\vdots &\vdots &\vdots\\
& &a& b \\\hline
& & & c &\cdots &c\\
& & & \vdots& &\vdots\\
\multicolumn{3}{c|}{\raisebox{2ex}[0pt]{\Huge0}}
& c & \cdots & c
\end{array}\right)
&\begin{array}{l}\left.\rule{0mm}{7mm}\right\}p\\
\\\left.\rule{0mm}{7mm}\right\}q
\end{array}\\[-5pt]
\begin{array}{cc}\underbrace{\rule{17mm}{0mm}}_m&
\underbrace{\rule{17mm}{0mm}}_m\end{array}&
\end{array}
\end{equation*}
效果: