LinearAlgebra - Maple Programming Help

Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Solvers : LinearAlgebra/TridiagonalForm

LinearAlgebra

 TridiagonalForm
 reduce a square Matrix to tridiagonal form

 Calling Sequence TridiagonalForm(A, out, ip, options, outopts)

Parameters

 A - square Matrix out - (optional) equation of the form output = obj where obj is one of 'T', 'Q', or 'NAG', or a list containing one or more of these names; selects result objects to compute ip - (optional) BooleanOpt(inplace); specifies if output overwrites input options - (optional); constructor options for the result object(s) outopts - (optional) equation(s) of the form outputoptions[o] = list where o is one of 'T', 'Q', or 'NAG'; constructor options for the specified result object

Description

 • The TridiagonalForm(A) function, where A is real symmetric or complex hermitian, returns a Matrix in tridiagonal form. This routine operates in the floating-point domain. Hence, the entries in Matrix A must necessarily be of type complex(numeric).
 The tridiagonal Matrix has nonzero entries only on the diagonal, the first superdiagonal, and the first subdiagonal.
 The original Matrix A and the orthogonal (unitary) reduction Matrix Q are related by $A=Q\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}T\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{Transpose}\left(Q\right)$ if A is real symmetric.  If A is complex hermitian, then $A=Q\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}T\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{HermitianTranspose}\left(Q\right)$.
 • If the Matrix A does not have a floating-point datatype, then a working copy which does is made in agreement with the environment variable UseHardwareFloats.
 • The output option (out) determines the content of the returned expression sequence.
 Depending on what is included in the output option, an expression sequence containing one or more of the objects T (the tridiagonal form) and Q (the orthogonal (unitary) reduction Matrix) can be returned. If output is a list, the objects are returned in the same order as specified in the list.
 If NAG is included in the output list, then the returned objects are an expression sequence consisting of T and Q. In this case, the Matrix T is returned with the result stored in its main and first subdiagonal.  The first superdiagonal and the rest of the Matrix contains values unrelated to the solution.  Matrix T is always returned as fully formed and it is not encoded in any way.
 • The inplace option (ip) determines where the result is returned. If given as inplace=true, then the result overwrites the first argument. If given as inplace=true and A has a complex data type, then the entries in T appear with a zero imaginary component. If given as inplace=false, or if this option is not included in the calling sequence, the result is returned in a new Matrix.
 The condition inplace=true can be abbreviated to inplace.
 The inplace option must be used with caution since, if the operation fails, the original Matrix argument may be corrupted.
 • The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix constructor that builds the result. These options may also be provided in the form outputoptions[o]=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions[o] option, the latter takes precedence (regardless of the order).
 The following list indicates permissible values for index [o] of outputoptions with their corresponding meaning.

 T tridiagonal form Q reducing Matrix NAG NAG format of the reduction

 • The inplace and constructor options are mutually exclusive.
 • This function is part of the LinearAlgebra package, and so it can be used in the form TridiagonalForm(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[TridiagonalForm](..).

Examples

 > $\mathrm{with}\left(\mathrm{LinearAlgebra}\right):$
 > $\mathrm{UseHardwareFloats}≔\mathrm{false}:$
 > $A≔⟨⟨1,2,-3,4⟩|⟨2,1,-1,9⟩|⟨-3,-1,2,10⟩|⟨4,9,10,0⟩⟩$
 ${A}{≔}\left[\begin{array}{rrrr}{1}& {2}& {-}{3}& {4}\\ {2}& {1}& {-}{1}& {9}\\ {-}{3}& {-}{1}& {2}& {10}\\ {4}& {9}& {10}& {0}\end{array}\right]$ (1)
 > $T≔\mathrm{TridiagonalForm}\left(A\right)$
 ${T}{≔}\left[\begin{array}{cccc}{1.}& {-}{5.385164805}& {0.}& {0.}\\ {-}{5.385164805}& {-}{2.137931040}& {9.678358859}& {0.}\\ {0.}& {9.678358859}& {-}{1.300394862}& {-}{8.183670421}\\ {0.}& {0.}& {-}{8.183670421}& {6.438325904}\end{array}\right]$ (2)
 > $Q≔\mathrm{TridiagonalForm}\left(A,\mathrm{output}='Q'\right):$
 > $\mathrm{map}\left(\mathrm{fnormal},Q\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}T\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{Transpose}\left(Q\right)\right)$
 $\left[\begin{array}{cccc}{1.00}& {2.000000003}& {-}{3.000000001}& {4.000000001}\\ {2.000000003}& {1.000000015}& {-}{0.999999996}& {9.000000009}\\ {-}{3.000000001}& {-}{0.999999994}& {1.999999996}& {10.00000001}\\ {4.000000001}& {9.000000003}& {10.00000000}& {0.}\end{array}\right]$ (3)
 > $\mathrm{map}\left(\mathrm{fnormal},Q\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}.\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{Transpose}\left(Q\right)\right)$
 $\left[\begin{array}{cccc}{1.00}& {0.}& {0.}& {0.}\\ {0.}& {1.000000002}& {-}{0.}& {0.}\\ {0.}& {-}{0.}& {1.000000001}& {-}{0.}\\ {0.}& {0.}& {-}{0.}& {1.000000000}\end{array}\right]$ (4)