summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/gauss/gauss-ex.tex
blob: 35a6bafaf5b9ebd7da393da95136ba40968889a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%
% This file is part of the gauss package by Manuel Kauers.
% Its purpose is to demonstrate the usage of the package.
% See the gauss-doc.dvi file for further information.
%
\documentclass{article}
\usepackage{amsmath}
\usepackage{gauss}
\usepackage{amssymb} % to import \leadsto

\begin{document}

 \section{An Example for Gaussian Elimination}

 Consider the real matrix
 \[
  A(t):=\begin{pmatrix}
   1 & 1 & 1 \\
   t & 2t & 2 \\
   t+1 & 0 & 2t
  \end{pmatrix},
 \]
 which depends on a real valued parameter~$t$. 
 We want to find all solutions of the homogenous linear system defined by $A$
 depending on the parameter~$t$.

 Therefore, we use the Algorithm Gauss:
 \begin{alignat*}1
  A(t)=\begin{gmatrix}[p]
   1 & 1 & 1 \\
   t & 2t & 2 \\
   t+1 & 0 & 2t 
  \rowops
   \add[-t]{0}{1}
   \add[-(t+1)]{0}{2}
  \end{gmatrix}\kern-6.23pt\leadsto&
  \begin{gmatrix}[p]
   1 & 1 & 1 \\
   0 & t & 2-t \\
   0 & -t-1 & t-1
  \rowops
   \add12
   \mult{2}{\cdot(-1)}
  \end{gmatrix}\\
  \leadsto&\begin{gmatrix}[p]
   1 & 1 & 1 \\
   0 & t & 2-t \\
   0 & 1 & -1 
  \rowops
   \swap12
   \add[-t]12
   \mult2{:2}
  \end{gmatrix}\\
  \leadsto&\begin{pmatrix}
   1 & 1 & 1 \\
   0 & 1 & -1 \\
   0 & 0 & 1
  \end{pmatrix}.
 \end{alignat*}
 
 \subsection*{Conclusion}

 We have learned that the matrix $A$ defined above is regular for all real 
 valued~$t$, and we hopefully also have learned how to use the gauss package.

\end{document}