矩陣1代碼
\documentclass{ctexart}
\usepackage{amsmath}
\begin{document}
\[
\begin{bmatrix}
1 & 0 & -1\\
1 & 0 & -1\\
1 & 0 & -1
\end{bmatrix}
\]
\end{document}
矩陣1運行結果
矩陣2代碼
\documentclass{ctexart}
\usepackage{amsmath}
\begin{document}
\[
T^{i-1}_{i}=\begin{bmatrix}
\cos\theta _{i} & -\sin\theta_{i} & 0 & a_{i-1}\\
\sin\theta_{i}\cos\alpha_{i-1} & \cos\theta_{i}\cos\alpha_{i-1} & -\sin\alpha_{i-1} & -d_{i}\sin\alpha_{i-1}\\
\sin\theta_{i}\sin\alpha_{i-1} & \cos\theta_{i}\sin\alpha_{i-1} & \cos\alpha_{i-1} & d_{i}\cos\alpha_{i-1}\\
0 & 0 & 0 & 1
\end{bmatrix}
\]
\end{document}
矩陣2運行結果