bobdu.cc

Follow me on GitHub

Matrices 矩阵


tags : latex


1.

Use $$\begin{matrix}…\end{matrix}$$ In between the \begin and \end, put the matrix elements. End each matrix row with \\, and separate matrix elements with &. For example, 使用 $$\begin{matrix}…\end{matrix}$$\begin\end 之间放置矩阵元素。 用 \\ 结束每个矩阵行,并用 分隔矩阵元素。 例如,

$$
        \begin{matrix}
        1 & x & x^2 \\
        1 & y & y^2 \\
        1 & z & z^2 \\
        \end{matrix}
$$

produces: 生成:

MathJax will adjust the sizes of the rows and columns so that everything fits. MathJax将调整行和列的大小,使所有内容都适合。

2.

To add brackets, either use \left…\right as in section 6 of the tutorial, or replace matrix with pmatrix $\begin{pmatrix}1&2\3&4\ \end{pmatrix}$ , bmatrix $\begin{bmatrix}1&2\3&4\ \end{bmatrix}$ , Bmatrix $\begin{Bmatrix}1&2\3&4\ \end{Bmatrix}$ , vmatrix $\begin{vmatrix}1&2\3&4\ \end{vmatrix}$ , Vmatrix $\begin{Vmatrix}1&2\3&4\ \end{Vmatrix}$ . 要添加括号,可以使用教程第6部分中的 \left…\right ,也可以将 matrix 替代成 …… 。

3.

Use \cdots $\cdots$ \ddots $\ddots$ \vdots $\vdots$ when you want to omit some of the entries: 当你想省略一些项时,用 …… 。

4.

For “augmented” matrices, put parentheses or brackets around a suitably-formatted table; see arrays below for details. Here is an example: 对于增广矩阵,将小括号或中括号放在一个适当格式的表格周围;有关详细信息,请参阅数组。这是一个例子:

is produced by: 它是这样实现的:

$$ \left[
    \begin{array}{cc|c}
      1&2&3\\
      4&5&6
    \end{array}
\right] $$

The cc|c is the crucial part here; it says that there are three centered columns with a vertical bar between the second and third. cc|c是这里的关键部分;它表明有三个中心对齐的列且在第二第三列之间有一条竖线。

5.

For small inline matrices use \bigl(\begin{smallmatrix} ... \end{smallmatrix}\bigr), e.g. $\bigl( \begin{smallmatrix} a & b \ c & d \end{smallmatrix} \bigr)$ is produced by:

对于小的内联矩阵,使用 …… 。

$\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)$

本文由BobDu翻译修改自https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference