<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.quanty.org/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www.quanty.org/feed.php">
        <title>Quanty - documentation:language_reference:objects:matrix:functions</title>
        <description></description>
        <link>https://www.quanty.org/</link>
        <image rdf:resource="https://www.quanty.org/_media/wiki/dokuwiki.svg" />
       <dc:date>2026-04-29T11:46:16+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/addspin?rev=1763608836&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugate?rev=1763608836&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugatetranspose?rev=1763608840&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/diagonal?rev=1763608841&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/eigensystem?rev=1763608838&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/enlarge?rev=1763608837&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/exp?rev=1763608839&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/expand?rev=1763608837&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/flatten?rev=1763608838&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/identity?rev=1763608841&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/inverse?rev=1763608835&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/new?rev=1763608841&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/random?rev=1763608839&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/removespin?rev=1763608836&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/rotate?rev=1763608835&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sqrt?rev=1763608837&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/start?rev=1763608838&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sub?rev=1763608837&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tooperator?rev=1763608840&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/totable?rev=1763608835&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/touserdata?rev=1763608837&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/transpose?rev=1763608839&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tridiagonalize?rev=1763608839&amp;do=diff"/>
                <rdf:li rdf:resource="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/zero?rev=1763608835&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www.quanty.org/_media/wiki/dokuwiki.svg">
        <title>Quanty</title>
        <link>https://www.quanty.org/</link>
        <url>https://www.quanty.org/_media/wiki/dokuwiki.svg</url>
    </image>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/addspin?rev=1763608836&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>AddSpin</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/addspin?rev=1763608836&amp;do=diff</link>
        <description>AddSpin
Matrix.AddSpin($M$) takes a Matrix $M$ that acts on a space with no spin included and returns the matrix doubled in size, where every former entry now splits in spin-up and spin-down. We assume the ordering of the basis alternates between spin up and down. This behaviour is equivalent to calling matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugate?rev=1763608836&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Conjugate</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugate?rev=1763608836&amp;do=diff</link>
        <description>Conjugate
Matrix.Conjugate($M$) takes a matrix and returns it with every entry replaced by its complex conjugate.
Example

Input


A = Matrix.New({{1,1+2*I},{3,4+I}})
B = Matrix.Conjugate(A)
print(B)


Result


{ {  1              ,  1 - 2 I        } ,
  {  3              ,  4 - 1 I        } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugatetranspose?rev=1763608840&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ConjugateTranspose</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/conjugatetranspose?rev=1763608840&amp;do=diff</link>
        <description>ConjugateTranspose
Matrix.ConjugateTranspose($M$) takes a matrix $M$ and returns its conjugate transpose.
Example

Input


A = Matrix.New({{1,1+2*I},{3,4+I}})
B = Matrix.ConjugateTranspose(A)
print(B)


Result


{ {  1              ,  3              } ,
  {  1 - 2 I        ,  4 - 1 I        } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/diagonal?rev=1763608841&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Diagonal</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/diagonal?rev=1763608841&amp;do=diff</link>
        <description>Diagonal
Matrix.Diagonal($\{x_1,x_2,...,x_n\}$) takes a list of $n$ numbers and returns an $n \times n$ diagonal matrix with the $x_i$ as entries.
If the option “Userdata” is set to true (default is false) the output is returned as a pointer rather than a table of tables (compare Matrix.ToUserdata()).

Example
matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/eigensystem?rev=1763608838&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Matrix.Eigensystem</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/eigensystem?rev=1763608838&amp;do=diff</link>
        <description>Matrix.Eigensystem
Matrix.Eigensystem(M) calculates the eigenvalues and eigenvectors of the square matrix M. If M is Hermitian it returns the eigenvalues and a single eigenvector, if M is non-hermitian it returns both the left and right eigenvectors matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/enlarge?rev=1763608837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Enlarge</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/enlarge?rev=1763608837&amp;do=diff</link>
        <description>Enlarge
Matrix.Enlarge($M$,$n$) takes a Matrix $M$ and replaces every entry with a diagonal matrix of size $n$ and entries equal to the original entry. 
Compare Matrix.AddSpin().

Example

Input


M ={{3,5},
    {-2,I}}
print(Matrix.Enlarge(M,3))


Result


{ { 3 , 0 , 0 , 5 , 0 , 0 } , 
  { 0 , 3 , 0 , 0 , 5 , 0 } , 
  { 0 , 0 , 3 , 0 , 0 , 5 } , 
  { -2 , 0 , 0 , (0 + 1 I) , 0 , 0 } , 
  { 0 , -2 , 0 , 0 , (0 + 1 I) , 0 } , 
  { 0 , 0 , -2 , 0 , 0 , (0 + 1 I) } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/exp?rev=1763608839&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Exp</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/exp?rev=1763608839&amp;do=diff</link>
        <description>Exp
Matrix.Exp($M$) takes $M$ and returns $e^M = \sum_{n=0}^{\infty} \frac{M^n}{n!}$.
Example

Input


M ={{-10,1},
    {1,0.3}}
print(Matrix.Exp(M))


Result


{ { 0.013665171949002 , 0.14163701011454 } , 
  { 0.14163701011454 , 1.4725263761288 } }


Table of contents
matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/expand?rev=1763608837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Expand</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/expand?rev=1763608837&amp;do=diff</link>
        <description>Expand
Matrix.Expand($M$, $n$, $x$) takes a quadratic matrix $M$ of dimension $m$ by $m$ and enlarges the dimension to $n$ by $n$, with $n\geq m$ required. The new diagonal values are set to $x$. If $x$ is not given all new entries are set to 0.
Example

Input


A = Matrix.New({{1,2},
                {3,4}})
B = Matrix.Expand(A,4)
C = Matrix.Expand(A,4,3)
print(B)
print(C)


matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/flatten?rev=1763608838&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Flatten</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/flatten?rev=1763608838&amp;do=diff</link>
        <description>Flatten

Matrix.Flatten($M$) takes an object $M$, which must be a matrix with matrix-valued entries, and returns the flattened version, which is a matrix with numbers as entries. This allows for working with block matrices, e.g. defining a matrix of the form
\begin{equation}
M=
\left(
\begin{matrix}
A &amp; B \\
C &amp; D\\
\end{matrix}
\right)
\end{equation}$A,B,C,D$$M$$0$matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/identity?rev=1763608841&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Identity</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/identity?rev=1763608841&amp;do=diff</link>
        <description>Identity
Matrix.Identity(n) returns an identity matrix of size $n\times n$.
If the option “Userdata” is set to false (default is true) the output is returned as a table of tables rather than a pointer (compare Matrix.ToUserdata() and Matrix.ToTable()).

Example

Input


print(Matrix.Identity(3))

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/inverse?rev=1763608835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Inverse</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/inverse?rev=1763608835&amp;do=diff</link>
        <description>Inverse
Matrix.Inverse($M$) returns $M^{-1}$.
Example

Input


M = Matrix.New({{1,2},{2,1}})
Minv = Matrix.Inverse(M)
print(&quot;The inverse of the matrix M&quot;)
print(M)
print(&quot;is&quot;)
print(Minv)
print(&quot;And Minv * M is&quot;)
print(Minv*M)


Result


The inverse of the matrix M
{ {  1      ,  2      } ,
  {  2      ,  1      } }

is
{ { -0.3333 ,  0.6667 } ,
  {  0.6667 , -0.3333 } }

And Minv * M is
{ {  1      ,  0      } ,
  {  0      ,  1      } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/new?rev=1763608841&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Matrix.New</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/new?rev=1763608841&amp;do=diff</link>
        <description>Matrix.New
Matrix.New(T) creates a matrix object from the table t. Matrices can only have numerical (real or complex) entries and all rows must be of equal length.
Example

Input


M = Matrix.New({{1,2},{2,1}})
print(M)


Result


{ {  1      ,  2      } ,
  {  2      ,  1      } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/random?rev=1763608839&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Random</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/random?rev=1763608839&amp;do=diff</link>
        <description>Random
Matrix.Random({$min$,$max$},{$m$,$n$}) returns a matrix of size $m \times n$ where every entry is a random number between $min$ and $max$.
If the option “Userdata” is set to false (default is true) the output is returned as a table of tables rather than a pointer (compare Matrix.ToUserdata() and matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/removespin?rev=1763608836&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:36+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>RemoveSpin</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/removespin?rev=1763608836&amp;do=diff</link>
        <description>RemoveSpin
Matrix.RemoveSpin(M) removes all even columns and even rows of matrix M.
Example

Input


M = Matrix.New({{1,0,2,0},
                {0,1,0,2},
                {3,0,4,0},
                {0,3,0,4}})
S = Matrix.RemoveSpin(M)
print(M)
print(S)

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/rotate?rev=1763608835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Rotate</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/rotate?rev=1763608835&amp;do=diff</link>
        <description>Rotate
Matrix.Rotate($M$,$U$) makes the matrix transformation $U^* . M . U^T$. 
Example

Input


M = Matrix.New({{ 1, I, 2, I},
                {-I, 1, I, 2},
                { 2,-I, 4, I},
                {-I, 2,-I, 4}})
val, fun = Matrix.Eigensystem(M)

Mdiag = Chop(Rotate(M,fun))
print(Mdiag)

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sqrt?rev=1763608837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Sqrt</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sqrt?rev=1763608837&amp;do=diff</link>
        <description>Sqrt
Matrix.Sqrt($M$) takes a quadratic matrix $M$ and returns $\sqrt{M}$, which is defined by the property $\sqrt{M}\sqrt{M} = M$.
M must be Hermitian and positive definite.

Example

Input


M = {{1,2*I},
    {-2*I,4}}
     
print(&quot;M:&quot;)
print(M)
sqrtM = Matrix.Sqrt(M)
print(&quot;sqrt(M):&quot;)
print(sqrtM)
print(&quot;sqrt(M)*sqrt(M)&quot;)
print(sqrtM*sqrtM)

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/start?rev=1763608838&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Functions</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/start?rev=1763608838&amp;do=diff</link>
        <description>Functions

Quanty defines a small library of functions that work on matrix objects.

Available Functions
functions index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sub?rev=1763608837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Sub</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/sub?rev=1763608837&amp;do=diff</link>
        <description>Sub
Matrix.Sub($M$,$n$) takes a Matrix $M$ and returns the upper left submatrix of size $n\times n$.
Matrix.Sub($M$,$r$,$c$) takes a Matrix $M$ and returns the upper left submatrix of size $r \times c$.

Matrix.Sub($M$, $r_0$, $r$, $c_0$, $c$) takes a Matrix $M$ and returns a submatrix of size $r \times c$, where the $1,1$ element of the new matrix coincides with the $r_0,c_0$$M$$1$$0$matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tooperator?rev=1763608840&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:40+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>ToOperator</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tooperator?rev=1763608840&amp;do=diff</link>
        <description>ToOperator
Matrix.Operator(M) creates an operator $O = \sum_{i,j} M[i][j] a^{\dagger}_{i-1} a_{j-1}^{\phantom{\dagger}}$ from the matrix $M$
Example

Input


M = {{1,2*I},
    {-2*I,4}}
 
O = Matrix.ToOperator(M)
print(O)


Result


Operator: Operator
QComplex         =          1 (Real==0 or Complex==1 or Mixed==2)
MaxLength        =          2 (largest number of product of lader operators)
NFermionic modes =          2 (Number of fermionic modes (site, spin, orbital, ...) in the one particle b…</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/totable?rev=1763608835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Matrix.ToTable</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/totable?rev=1763608835&amp;do=diff</link>
        <description>Matrix.ToTable
Matrix.ToTable($M$) takes a matrix $M$ in userdata form and returns the object as a table of tables in lua.
Compare Matrix.ToUserdata().

Table of contents
matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/touserdata?rev=1763608837&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:37+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Matrix.ToUserdata</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/touserdata?rev=1763608837&amp;do=diff</link>
        <description>Matrix.ToUserdata
Matrices are, per default, tables of tables in Lua. When algebraic operations are performed on them, they are repeatedly copied and moved, which can lead to severe performance issues if the matrices are large objects.
A call of Matrix.ToUserdata($M$matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/transpose?rev=1763608839&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Transpose</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/transpose?rev=1763608839&amp;do=diff</link>
        <description>Transpose
Matrix.Transpose($M$) takes a matrix $M$ and returns its transpose.
Example

Input


A = Matrix.New({{1,1+2*I},{3,4+I}})
B = Matrix.Transpose(A)
print(B)


Result


{ {  1              ,  3              } ,
  {  1 + 2 I        ,  4 + 1 I        } }

matrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tridiagonalize?rev=1763608839&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:39+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Tridiagonalize</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/tridiagonalize?rev=1763608839&amp;do=diff</link>
        <description>Tridiagonalize
Matrix.Tridiagonalize(M) returns the matrix in triple-diagonal form. The first element returned is a try-diagonal response function representing the matrix. The second element returned is a matrix that represents the unitary matrix that transforms the Hermitian matrix M to try-diagonal form. Possible options includematrix index</description>
    </item>
    <item rdf:about="https://www.quanty.org/documentation/language_reference/objects/matrix/functions/zero?rev=1763608835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2025-11-20T03:20:35+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>Zero</title>
        <link>https://www.quanty.org/documentation/language_reference/objects/matrix/functions/zero?rev=1763608835&amp;do=diff</link>
        <description>Zero
Matrix.Zero(n) returns a zero matrix of size $n\times n$.
If the option “Userdata” is set to false (default is true) the output is returned as a table of table rather than a pointer (compare Matrix.ToUserdata() and Matrix.ToTable()).

Example

Input


print(Matrix.Zero(3))


Result


{ { 0 , 0 , 0 } , 
  { 0 , 0 , 0 } , 
  { 0 , 0 , 0 } }

matrix index</description>
    </item>
</rdf:RDF>
