
答案1
給你:
\documentclass{article}
\usepackage{mathtools} %
\begin{document}
\[ \renewcommand{\arraystretch}{1.4}
\begin{bmatrix}
s + 3 & 1 & 0 & \vrule & 1 & 0 & 0 \\
-2 & s & 0 & \vrule & 0 & 1 & 0 \\
1 & 0 & a & \vrule & 0 & 0 & 1
\end{bmatrix}
\]
\end{document}
編輯:另一種可能性,與blkarray
和bigstrut
:
\[
\setlength{\BAextrarowheight}{3pt}
\setlength{\bigstrutjot}{1ex}
\begin{blockarray}{[ccc|ccc]}
s + 3 & 1 & 0 & 1 & 0 & 0 \bigstrut[t]\\
-2 & s & 0 & 0 & 1 & 0 \\
1 & 0 & a & 0 & 0 & 1 \bigstrut[b]
\end{blockarray}
\]
答案2
答案3
編輯:2020-7-18這是我的建議,使用nicematrix
包裹。我記得@F的評論。 Pantignyc
認為,從 5.0 版本開始,有必要使用C
.
\documentclass[a4paper,12pt]{article}
\usepackage{nicematrix}
\begin{document}
$\begin{bNiceArray}{ccc|ccc}
s+3 & 1 & 0 & 1 & 0 & 0 \\
-2 & s & 0 & 0 & 1 & 0 \\
1 & 0 & s & 1 & 0 & 1
\end{bNiceArray}$
\end{document}