Wie setzt man schräge Punkte in Gleichungssystemen?

Wie setzt man schräge Punkte in Gleichungssystemen?

Ich versuche, das obere Dreieckssystem der Rückwärtssubstitution in Latex zu schreiben

das Format sieht so aus

Ich versuche, den Code zu schreiben, aber er funktioniert nicht richtig

    \begin{equation*}
    \begin{split}
        &a_{1,1}x_{1}  + a_{1,2}x_{2} +\;.....+ a_{1},{n}X_{n} = b_{1}\\
               &  a_{2,2}x_{2} +\;.....+a_{2},{n}X_{n}  = b_{2}\\
      \end{split}
     \end{equation*}

Bildbeschreibung hier eingeben

bitte helfen Sie mir, was ist falsch? Ich habe es &in einem anderen Code in meinem Projekt versucht und es funktioniert. Warum funktioniert es hier nicht richtig? :(

Bildbeschreibung hier eingeben

Antwort1

Eine arrayfundierte Lösung:

\documentclass{article}
\usepackage{amsmath,array}

\begin{document}

\begin{equation*}
\setlength{\arraycolsep}{0pt}% so we don't need too many @{}
\newcommand{\LD}{\ldots}%
\newcommand{\DF}[1]{\multicolumn{#1}{c}{\dotfill}}%
\newcommand{\DD}{\multicolumn{2}{r}{\ddots}}%
\newcommand{\VD}{\multicolumn{1}{c}{\vdots}}%
\begin{array}{*{5}{r>{{}}c<{{}}}l}
a_{1,1}x_1 &+& a_{1,2}x_2 &+& \DF{3}     &+& a_{1,n}x_n &=& b_1 \\[1ex]
           & & a_{2,2}x_2 &+& \DF{3}     &+& a_{2,n}x_n &=& b_2 \\
           & & \DD          &            & & && \VD     & & \VD \\
           & &            & & a_{i,i}x_i &+& \LD        &+& a_{i,n}x_n &=& b_i \\
           & &            & & \DD          & && \VD     & & \VD \\
           & &            & &            && & & a_{n,n}x_n &=& b_n
\end{array}
\end{equation*}

\end{document}

Bildbeschreibung hier eingeben

Antwort2

Hier ist eine array-basierte Lösung:

Bildbeschreibung hier eingeben

\documentclass{article}
\usepackage{newtxtext,newtxmath} % Times Roman clone - optional
\usepackage{array}               % for '\newcolumntype' macro
\newcolumntype{C}{>{{}}c<{{}}}   % col. type for bin. and rel. operators
\newcommand\myddots{\multicolumn{1}{r}{\ddots}} % handy shortcut macro
\begin{document}

\[
\setlength\arraycolsep{0pt}
\begin{array}{*{5}{cC}c}
a_{1,1}x_1 &+& a_{1,2}x_2 &+& \multicolumn{3}{c}{\dotfill} &+& a_{1,n}x_n &=& b_1 \\
&& a_{2,2}x_2 &+& \multicolumn{3}{c}{\dotfill} &+& a_{2,n}x_n &=& b_2 \\
&& \myddots  && && \phantom{a_{i,n}x_n} && \vdots && \vdots\\
&&&& a_{i,i}x_i &+& \dotfill &+& a_{i,n}x_n &=& b_i \\
&&&& \myddots &&&& \vdots && \vdots\\
&&&&&&&& a_{n,n}x_n &=& b_n
\end{array}
\]
\end{document}

Antwort3

ok, ich habe die Lösung gefunden

     \[    
       \begin{array}{@{}*{7}{c@{}}}
        & a_{1,1}x_{1}  + a_{1,2}x_{2} +\;.....+ a_{1},{n}X_{n} = b_{1}\\
          & a_{2,2}x_{2} +\;.....+a_{2},{n}X_{n}  = b_{2}\\         
          \end{array}               
   \]    

Antwort4

Eine alignedat-basierte Lösung mit Hilfe von eqparbox:

\documentclass{article}
\usepackage{mathtools}
\usepackage{eqparbox} 

\begin{document}

  \begin{equation*}
  \begin{alignedat}{2}
   a_{1,1}x_{1} + a_{1,2}x_{2} & +{}&\cdots\cdots \cdots \cdots + a_{1,n}X_{n} & = b_{1}\\
         a_{2,2}x_{2} & +{} &\cdots\cdots \cdots\cdots +a_{2,n}X_{n} & = b_{2}\\[-1.5ex]
        &\ddots && \vdotswithin{=}\\[-1ex]
        & & a_{i, i}x_{i}\eqparbox{M}{${} + \dots + a_{i, n}X_{n} $} & = b_{i} \\[-1.5ex]
        & &\eqparbox{M}{\raisebox{1ex}{$\ddots $}} & \vdotswithin{=}\\[-2ex]
        & & a_{n, n}X_{n} & =b_{n}
  \end{alignedat}
 \end{equation*}
\end{document} 

Bildbeschreibung hier eingeben

verwandte Informationen