construct the Matrix for a Givens rotation - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Linear Algebra : LinearAlgebra Package : Constructors : LinearAlgebra/GivensRotationMatrix

LinearAlgebra[GivensRotationMatrix] - construct the Matrix for a Givens rotation

Calling Sequence

GivensRotationMatrix(V, i, j, d, cpt, options)

Parameters

V

-

Vector; used for constructing the Givens rotation

i

-

non-zero integer; index of an entry in V which is not rotated to zero, but which is used to construct the Givens rotation

j

-

non-zero integer; index of an entry in V which is rotated to zero

d

-

(optional) integer greater than or equal to 2; dimension of the resulting square Matrix

cpt

-

(optional) BooleanOpt(compact); selects the compact form of the output

options

-

(optional); constructor options for the result object

Description

• 

The GivensRotationMatrix(V, i, j) function constructs the square Matrix of a Givens rotation.

• 

If G := GivensRotationMatrix(V, i, j) and n is the dimension of V, then G is an n x n Matrix with G[i, i] = G[j, j] = V[i] / (V[i]^2 + V[j]^2)^(1/2), G[i, j] = -G[j, i] = V[j] / (V[i]^2 + V[j]^2)^(1/2), G[m, m] = 1 if m <> i and m <> j, and G[m, n] = 0 otherwise.

• 

The GivensRotationMatrix(V, i, j, d) function acts like GivensRotationMatrix(V, i, j) except that a d x d Matrix is returned.

• 

If the compact option (cpt) is included in the calling sequence as just the symbol compact or in the form compact=true, then the result is built by using a shape function designed to minimize storage.  If the option is omitted or entered as compact=false, a full rectangular Matrix is constructed.  Generally, if space is not a consideration, the full rectangular form (the default) is more efficient.

  

Note:  If the compact form is selected, any datatype specification in the constructor options is silently ignored.  The datatype of any data retrieved from the constructed Matrix is determined by the data used to build the Matrix.

• 

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=[...], where [...] represents a Maple list.  If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).

• 

This function is part of the LinearAlgebra package, and so it can be used in the form GivensRotationMatrix(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[GivensRotationMatrix](..).

Examples

withLinearAlgebra&colon;

V:=1&comma;2&comma;3&comma;4

V:=1234

(1)

M:=GivensRotationMatrixV&comma;1&comma;3

M:=11010031010001003101001101000001

(2)

M&period;V

10204

(3)

N:=GivensRotationMatrixV&comma;4&comma;2&comma;6

N:=1000000100000045350000354500000010000001

(4)

N&period;Vector6&comma;V

120500

(5)

See Also

LinearAlgebra[HouseholderMatrix], LinearAlgebra[MatrixVectorMultiply], type/BooleanOpt, Vector


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam