\documentclass[12pt,a4paper]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
\begin{document}
\[ \begin{pmatrix}
1 &2 &0&\cdots& 0\\
3& 4 &0&\cdots& 0\\
0 & 0 &0&\cdots& 0\\
\vdots & \vdots & \vdots & \vdots\\
0 & 0 &0&\cdots& 0\\
\end{pmatrix}\]
and
\[U_k= \begin{bmatrix}
J_{k\times k} &0_{k\times (n-k)} \\
0_{(n-k)\times k}& I_{(n-k)\times (n-k)}\\
\end{bmatrix}\]
\end{document}
我想细分以下两个矩阵
就像下面这个
答案1
@js bibra 的简短简历(非常长的答案)回答:
\documentclass[12pt,a4paper]{article}
\begin{document}
\[
\left[\begin{array}{cc|*{3}{c}}
1 & 2 & 0 & \cdots & 0 \\
3 & 4 & 0 & \cdots & 0 \\
\hline
0 & 0 & 0 & \cdots & 0 \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
0 & 0 & 0 & \cdots & 0
\end{array}\right]
\]
and
\[
U_k = \left[\begin{array}{c|c}
J_{k\times k} & 0_{k\times (n-k)} \\
\hline
0_{(n-k)\times k} & I_{(n-k)\times (n-k)}
\end{array}\right]
\]
\end{document}
答案2
https://tex.stackexchange.com/a/240865/197451
\documentclass{article}
\begin{document}
\[
M = \left(
\begin{array}{c|c}
A & B\\
\hline
C & D
\end{array}
\right)
\]
\end{document}
对于更大的矩阵
来源点击这个词。
答案3
简单来说pstricks
:在矩阵的相关位置插入空节点,并用线连接它们:
\documentclass[12pt, a4paper, svgnames]{article}
%------------------------------------------------------------
\usepackage{amsmath,amssymb,amsthm}
\usepackage{pst-node}
\begin{document}
\[ \begin{pmatrix}
1 &2 \pnode[1ex, 1.6ex]{V}&0&\cdots& 0\\
\pnode[-0.6ex, -0.7ex]{H}3& 4 &0&\cdots& 0\pnode[0.6ex, -0.7ex]{K}\\
0 & 0 &0&\cdots& 0\\
\vdots & \vdots & \vdots & \vdots\\
0 & 0 \pnode[1ex, -0.5ex]{W} &0&\cdots& 0
\end{pmatrix}
\psset{linecolor=IndianRed}
\ncline{V}{W}\ncline{H}{K}\]
and
\[U_k= \begin{bmatrix}
J_{k\times k} &\pnode[0,1.6ex] {V}& 0_{k\times (n-k)} \\
\pnode[-0.3ex,1.9ex]{H} 0_{(n-k)\times k}&\pnode[0,-0.6ex] {W} & I_{(n-k)\times (n-k)}\pnode[0.3ex, 1.9ex]{K}
\end{bmatrix}
\psset{linecolor=SteelBlue}
\ncline{V}{W}\ncline{H}{K} \]
\end{document}