Latex如何输入各种矩阵:
\usepackage{amsmath,amssymb,amsfonts}
1.直接用matrix、pmatrix、bmatrix、Bmatrix或者vmatrix
2.第二种方法 array
3.插入方程组
第一种方法
(1)直接用matrix
\begin{equation*}
\begin{matrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{matrix}
\end{equation*}
我们的输出结果为:
(2)直接用pmatrix
\begin{equation*}
\begin{pmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{pmatrix}
\end{equation*}
我们的输出结果为:
(3)直接用bmatrix
\begin{equation*}
\begin{bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{bmatrix}
\end{equation*}
我们的输出结果为:
(4)直接用Bmatrix
\begin{equation*}
\begin{Bmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{Bmatrix}
\end{equation*}
我们的输出结果为:
(5)直接用vmatrix
\begin{equation*}
\begin{vmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{vmatrix}
\end{equation*}
我们的输出结果为:
(6)直接用Vmatrix
\begin{equation*}
\begin{Vmatrix}
1 & 0 & 0\\
0 & 1 & 0\\
0 & 0 &1
\end{Vmatrix}
\end{equation*}
我们的输出结果为:
我们总结一下:
\begin{equation*}
\begin{gathered}
\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{matrix}
\quad
\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{pmatrix}
\quad
\begin{bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{bmatrix}
\quad
\begin{Bmatrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{Bmatrix}
\quad
\begin{vmatrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{vmatrix}
\quad
\begin{Vmatrix} 1 & 0 & 0 \\ 0 & 1 & 0\\ 0 & 0 &1 \end{Vmatrix}
\end{gathered}
\end{equation*}
我们的输出结果为:
(7)最常用矩阵插入
\begin{equation*}
\begin{bmatrix}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33}
\end{bmatrix}
\end{equation*}
我们的输出结果为:
(8)对角矩阵插入:
\begin{equation*}
\begin{bmatrix}
a_{11} & & & \\
& a_{22} & & \\
& & a_{33}&\\
& & &a_{44}
\end{bmatrix}
\end{equation*}
(9)复杂矩阵的写法
\begin{equation*}
\begin{bmatrix}
a1 & a2 & \cdots & an\\
b1 & b2 & \cdots & bn\\
\vdots & \vdots &\ddots & \vdots\\
m1 & m2 & \cdots & mn
\end{bmatrix}
\end{equation*}
我们的输出结果为:
第二种方法 array
\begin{equation*}
\left[
\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33}
\end{array}
\right]
\end{equation*}
我们的输出结果为:
矩阵乘法的总结
\begin{equation*}
\left[
\begin{array}{c}
X \\
\Theta \\
y
\end{array}
\right]
=
\left[
\begin{array}{ccc}
a_{11} & a_{12} & a_{13} \\
a_{21} & a_{22} & a_{23} \\
a_{31} & a_{32} & a_{33}
\end{array}
\right]
\left[
\begin{array}{c}
b_{1} \\
b_{2} \\
b_{3}
\end{array}
\right]
\end{equation*}
我们的输出结果为:
插入方程组
\begin{equation*}
\left\{
\begin{array}{c}
a_{11}x_1+a_{12}x_2+\cdots+a_{1n}x_n=b_1 \\
a_{21}x_1+a_{22}x_2+\cdots+a_{2n}x_n=b_2 \\
\cdots \\
a_{n1}x_1+a_{n2}x_2+\cdots+a_{nn}x_n=b_n
\end{array}
\right.
\end{equation*}
我们的输出结果为: