Documentation: `See also` is used instead of `See Also`.
[scilab.git] / scilab / modules / linear_algebra / help / en_US / matrix / det.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
4  * Copyright (C) 2008 - INRIA
5  *
6  * Copyright (C) 2012 - 2016 - Scilab Enterprises
7  *
8  * This file is hereby licensed under the terms of the GNU GPL v2.0,
9  * pursuant to article 5.3.4 of the CeCILL v.2.1.
10  * This file was originally licensed under the terms of the CeCILL v2.1,
11  * and continues to be available under such terms.
12  * For more information, see the COPYING file which you should have received
13  * along with this program.
14  *
15  -->
16 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="det">
17     <refnamediv>
18         <refname>det</refname>
19         <refpurpose>determinant</refpurpose>
20     </refnamediv>
21     <refsynopsisdiv>
22         <title>Syntax</title>
23         <synopsis>det(X)
24             [e,m]=det(X)
25         </synopsis>
26     </refsynopsisdiv>
27     <refsection>
28         <title>Arguments</title>
29         <variablelist>
30             <varlistentry>
31                 <term>X</term>
32                 <listitem>
33                     <para>real or complex square matrix, polynomial or rational matrix.</para>
34                 </listitem>
35             </varlistentry>
36             <varlistentry>
37                 <term>m</term>
38                 <listitem>
39                     <para>real or complex number, the determinant base 10 mantissae</para>
40                 </listitem>
41             </varlistentry>
42             <varlistentry>
43                 <term>e</term>
44                 <listitem>
45                     <para>integer, the determinant base 10 exponent</para>
46                 </listitem>
47             </varlistentry>
48         </variablelist>
49     </refsection>
50     <refsection>
51         <title>Description</title>
52         <para>
53             <literal>det(X)</literal> ( <literal>m*10^e</literal> is the determinant of the square matrix <literal>X</literal>.
54         </para>
55         <para>
56             For polynomial matrix <literal>det(X)</literal> is equivalent to <literal>determ(X)</literal>.
57         </para>
58         <para>
59             For rational matrices <literal>det(X)</literal> is equivalent to <literal>detr(X)</literal>.
60         </para>
61         <para>
62             <important>
63                 The <literal>det</literal> and <literal>detr</literal> functions don't use the same algorithm. 
64                 For a rational fraction, <literal>det(X)</literal> is overloaded by <literal>%r_det(X)</literal> which is based on the <literal>determ</literal> function.
65                 <literal>detr()</literal> uses the Leverrier method.
66             </important>
67             <warning>
68                 Sometimes the <literal>det</literal> and <literal>detr</literal> functions may return different values for rational matrices.
69                 In such cases you should set rational simplification mode off by using <code>simp_mode(%f)</code> to get the same result.
70             </warning>
71         </para>
72     </refsection>
73     <refsection>
74         <title>References</title>
75         <para>
76             det computations are based on the Lapack routines
77             DGETRF for  real matrices and  ZGETRF for the complex case.
78         </para>
79         <para>
80             Concerning sparse matrices, the determinant is obtained from LU factorization of umfpack library.
81         </para>
82     </refsection>
83     <refsection>
84         <title>Examples</title>
85         <programlisting role="example"><![CDATA[
86 x=poly(0,'x');
87 det([x,1+x;2-x,x^2])
88 w=ssrand(2,2,4);roots(det(systmat(w))),trzeros(w)   //zeros of linear system
89 A=rand(3,3);
90 det(A), prod(spec(A))
91  ]]></programlisting>
92     </refsection>
93     <refsection role="see also">
94         <title>See also</title>
95         <simplelist type="inline">
96             <member>
97                 <link linkend="detr">detr</link>
98             </member>
99             <member>
100                 <link linkend="determ">determ</link>
101             </member>
102             <member>
103                 <link linkend="simp_mode">simp_mode</link>
104             </member>
105         </simplelist>
106     </refsection>
107 </refentry>