]1
我怎样才能像图中这样写出矩阵方程?我需要带有 vdots 的增强矩阵和矩阵内部的变量名,该变量名覆盖矩阵的多个行和列。
答案1
像这样吗?
\documentclass{article}
\usepackage{amsmath, array}
\begin{document}
\[ \setlength{\extrarowheight}{1pt} \setlength{\arrayrulewidth}{0.6pt}
T_0 = \begin{bmatrix}
\begin{array}{@{}c|c@{}}
10& \\[-0.8ex]
\vdots & C_0 \\
10
\end{array}
\end{bmatrix}
\;\text{ and }\;
T_1 = \begin{bmatrix}
\begin{array}{@{}c|c@{}}
10& \\[-0.8ex]
\vdots & C_1 \\
10
\end{array}
\end{bmatrix}
\]
\end{document}
答案2
基本的简单代码:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\[
T_0 = \left[\begin{array}{c|c}
10 & \\
\vdots & C^0 \\
10 &
\end{array}\right]
\quad\text{and}\quad
T_1 = \left[\begin{array}{c|c}
10 & \\
\vdots & C^1 \\
10 &
\end{array}\right]
\]
\end{document}
附加:
或者使用amsmath
包的更复杂的代码:
\documentclass{article}
\usepackage{amsmath} % math environments
\makeatletter
\renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]%
{\hskip -0.2\arraycolsep
\setlength\arraycolsep{1pt}
\let\@ifnextchar\new@ifnextchar
\array{#1}
}
\makeatother
\begin{document}
\[
T_0 =
\begin{bmatrix}[c @{\ \vline\ } c]
10 & \\
\vdots & C^0 \\
10 &
\end{bmatrix}
\quad\text{and}\quad
T_1 = \begin{bmatrix}[c @{\ \vline\ } c]
10 & \\
\vdots & C^1 \\
10 &
\end{bmatrix}
\]
\end{document}