使用边界矩阵的乳胶矩阵

使用边界矩阵的乳胶矩阵

我在乳胶中写下了这个:

\begin {equation}
\label{E:1}
A={\frac{w_i}{w_j}} = {a_{ij}} ={\bbordermatrix{& C_1     & C_2     & C_\ldots & C_n \cr
    C_1     & (w_1/w_1)=1     & (w_1/w_2)=a_{12}     & \ldots & (w_1/w_n)=a_{1n} \cr
    C_2     & (w_2/w_1)=1/a_{12}     & (w_2/w_2)=1     & \ldots & (w_2/w_n)=a_{2n} \cr
    \vdots & \vdots & \vdots & \ddots & \vdots \cr
    C_n     & (w_n/w_1)=1/a_{1n}     & (w_n/w_2)=1/a_{2n}     & \ldots  & (w_n/w_n)=1 \cr}}
\end {equation}

我发现了这个:

缺少{ 插入。

检查您的 $ 是否与数学表达式相匹配。如果匹配,那么您可能在普通文本中使用了需要在数学模式下使用的符号。下标 ( _ )、积分 ( \int )、希腊字母 ( \alpha、\beta、\delta ) 和修饰符 (\vec{x}、\tilde{x} ) 等符号必须在数学模式下书写。请在此处查看完整列表。如果您打算使用数学模式,则使用 $ … $ 表示“内联数学模式”,$$ … $$ 表示“显示数学模式”,或者使用 \begin{math} … \end{math}。

了解更多 \mathinner l.393 ...)=1/a_{2n} & \ldots & (w_n/w_n)=1 \cr} } 这里必须使用左括号,所以我加了一个。您可能想删除和/或插入一些更正,以便我尽快找到匹配的右括号。如果您对这一切感到困惑,请尝试立即输入“I}”。

!缺失 } 插入。 } l.393 ...)=1/a_{2n} & \ldots & (w_n/w_n)=1 \cr} } 我已输入似乎需要修复当前对齐的当前列的内容。尝试继续,因为这几乎可能有效。

我尝试寻找这个问题,但什么也没找到。

有人能帮助我吗?提前致谢。

答案1

只需将第一排\ldots的内部放下{},就可以了。

\documentclass[10pt,a4paper]{article}
\begin{document}
    \begin {equation}
    \label{E:1}
    A={\frac{w_i}{w_j}} = {a_{ij}} =\bordermatrix{~ & C_1     & C_2     & C_{\ldots} & C_n \cr
    C_1     & (w_1/w_1)=1     & (w_1/w_2)=a_{12}     & \ldots & (w_1/w_n)=a_{1n} \cr    
\vdots & \vdots & \vdots & \ddots & \vdots \cr
C_n     & (w_n/w_1)=1/a_{1n}     & (w_n/w_2)=1/a_{2n}     & \ldots  & (w_n/w_n)=1 \cr}
    \end {equation}
\end{document}

您将获得以下结果:

在此处输入图片描述

答案2

{pNiceMatrix}供参考,这里有一种用构建该矩阵的方法nicematrix

\documentclass{article}
\usepackage{nicematrix}

\begin{document}

\[
A = \frac{w_i}{w_j} = a_{ij} =
\begin{pNiceMatrix}[first-col,first-row]
& C_1     & C_2     & C_{\ldots} & C_n \\
C_1     & (w_1/w_1)=1     & (w_1/w_2)=a_{12}     & \ldots & (w_1/w_n)=a_{1n} \\
\Vdots[shorten=6pt] & \vdots & \vdots & \ddots & \vdots \\
C_n     & (w_n/w_1)=1/a_{1n}     & (w_n/w_2)=1/a_{2n}     & \ldots  & (w_n/w_n)=1 
\end{pNiceMatrix}
\]

\end{document}

上述代码的输出

相关内容