我想做的是使用克莱姆法则求解一个具有三个变量(设它们为 $d$、$e$ 和 $f$)的线性方程组。我已经完成了\usepackage{amsmath}
。至少我可以编译这个:
\begin{align}
\left|\mathbf{\Delta}\right|
=&
\begin{vmatrix}
0 & 1 & 1\\
2 & -4&0 \\
1 & 0&-2
\end{vmatrix}
=0+0+0-(-4)-(-4)-0
=8
\end{align}
但是我不能:
\begin{align}
\left|\mathbf{\Delta}\right|
=&
\begin{vmatrix}
0 & 1 & 1\\
2 & -4&0 \\
1 & 0&-2
\end{vmatrix}
=0+0+0-(-4)-(-4)-0
=8
\\
d
=&
hello
第一个错误信息是这样的:
For additional information on amsmath, use the `?' option.
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amstext.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsgen.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsbsy.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/amsmath/amsopn.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/chemgreek/chemgreek.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/l3packages/xparse/xparse.sty))
(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/graphics.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics/trig.sty)
(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-cfg/graphics.cfg)
(/usr/local/texlive/2021/texmf-dist/tex/latex/graphics-def/luatex.def)))
(./main.aux) (/usr/local/texlive/2021/texmf-dist/tex/latex/base/ts1cmr.fd)
(/usr/local/texlive/2021/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (/usr/local/texlive/2021/texmf-dist/tex/latex/epstopdf-pkg/epstopdf-base.sty
(/usr/local/texlive/2021/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg))
Runaway argument?
=0+0+0-(-4)-(-4)-0 =8 \\
! Paragraph ended before \align was complete.
<to be read again>
\par
l.66
?
我正要遵循三个方程来表明 $d$、$e$ 和 $f$ 是什么。
答案1
感谢您评论并给我建议!它们很有效!
\begin{align}
|\mathbf{\Delta}| % Not really good to use \left| and \right|
&= % =& does not look good
\begin{vmatrix}
0 & 1 & 1\\
2 & -4&0 \\
1 & 0&-2
\end{vmatrix}
=0+0+0-(-4)-(-4)-0
=8
\\
% no blank line!
d
&= % not =&
hello
\end{align}