![如何在乳胶中生成这个矩阵?](https://linux22.com/image/421579/%E5%A6%82%E4%BD%95%E5%9C%A8%E4%B9%B3%E8%83%B6%E4%B8%AD%E7%94%9F%E6%88%90%E8%BF%99%E4%B8%AA%E7%9F%A9%E9%98%B5%EF%BC%9F.png)
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
\hskip -\arraycolsep
\let\@ifnextchar\new@ifnextchar
\array{#1}}
\makeatother
\begin{document}
\begin{equation}
\begin{bmatrix}[cc|c|c]
0 & -I & I & 0\\
0 & 0 & -I & I \\
\end{bmatrix}
\end{equation}
\end{document}
答案1
您无法仅使用 来获取这些矩阵bmatrix
,而需要使用较低级别的array
:
\documentclass{article}
\usepackage{amsmath,booktabs}
\begin{document}
\[
\mathbf{L}=
\begin{bmatrix}
\begin{array}{@{}cc@{}}
\mathbf{I} & \mathbf{0} \\
\mathbf{0} & \mathbf{I} \\
\midrule[\arrayrulewidth]
\mathbf{0} & \mathbf{I} \\
\midrule[\arrayrulewidth]
\mathbf{0} & \mathbf{I}
\end{array}
\end{bmatrix}
\implies
\mathbf{L}^+=
\begin{bmatrix}
\begin{array}{@{}cc|c|c@{}}
\mathbf{I} & \mathbf{0} & \mathbf{0} & \mathbf{0} \\
\mathbf{0} & \mathbf{I} & \mathbf{0} & \mathbf{0}
\end{array}
\end{bmatrix}
\]
\end{document}