Latex mathematical formula in the matrix

Brackets in the form of a matrix

Use matrix, pmatrix, bmatrix, Bmatrix, vmatrixor Vmatrixthe environment:

$$
\begin{gathered}
\begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix}
\quad
\begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix}
\quad
\begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}
\quad
\begin{Bmatrix} 1 & 0 \\ 0 & -1 \end{Bmatrix}
\quad
\begin{vmatrix} a & b \\ c & d \end{vmatrix}
\quad
\begin{Vmatrix} i & 0 \\ 0 & -i \end{Vmatrix}
\end{gathered}
$$

\[ \begin{gathered} \begin{matrix} 0 & 1 \\ 1 & 0 \end{matrix} \quad \begin{pmatrix} 0 & -i \\ i & 0 \end{pmatrix} \quad \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix} \quad \begin{Bmatrix} 1 & 0 \\ 0 & -1 \end{Bmatrix} \quad \begin{vmatrix} a & b \\ c & d \end{vmatrix} \quad \begin{Vmatrix} i & 0 \\ 0 & -i \end{Vmatrix} \end{gathered} \]

array environment

Use arraythe environment to enter the matrix:

$$      %开始数学环境
\left(                 %左括号
  \begin{array}{ccc}   %该矩阵一共3列,每一列都居中放置
    a11 & a12 & a13\\  %第一行元素
    a21 & a22 & a23\\  %第二行元素
  \end{array}
\right)                 %右括号
$$

\ [Mathematical environment Start% \ left (% left parenthesis \ begin {array} {ccc}% of the total of three matrix, each column placed centrally a11 & a12 & a13 \\% first row elements a21 & a22 & a23 \ \% of the second line element \ end {array} \ right)% right parenthesis \]

Upper triangular matrix

Upper triangular matrix

$$
A=\begin{bmatrix}
a_{11} & \dots & a_{1n}\\
  & \ddots & \vdots\\
0 & & a_{nn}
\end{bmatrix}_{n \times n}
$$

\[ A=\begin{bmatrix} a_{11} & \dots & a_{1n}\\ & \ddots & \vdots\\ 0 & & a_{nn} \end{bmatrix}_{n \times n} \]

Partitioned Matrix

Partitioned Matrix

$$
\begin{pmatrix}
\begin{matrix} 1&0\\0&1 \end{matrix} & \text{0}\\
\text{0} & \begin{matrix} 1&0\\0&1 \end{matrix}
\end{pmatrix}
$$

\[ \begin{pmatrix} \begin{matrix} 1&0\\0&1 \end{matrix} & \text{0}\\ \text{0} & \begin{matrix} 1&0\\0&1 \end{matrix} \end{pmatrix} \]

Inline matrix

Inline matrix

$
\left(
\begin{smallmatrix}
x & \frac{x}{y} \\
\frac{y}{x} & x
\end{smallmatrix}
\right)
$

This is a $
\ left (
\ smallmatrix the begin {}
X & \ FRAC {X} {Y} \
\ X FRAC {Y}} & {X
\ smallmatrix End {}
\ right)
within a matrix of rows $

Guess you like

Origin www.cnblogs.com/solvit/p/11345482.html