LinearAlgebra
GramSchmidt
compute an orthogonal set of Vectors
Calling Sequence
Parameters
Description
Examples
GramSchmidt(V, c, n, options)
V
-
list or set of Vector(s)
c
(optional) equation of the form conjugate=true or false
n
(optional) equation of the form normalized=true or false
options
(optional); constructor options for the result object
The GramSchmidt(V) function computes a list or set of orthogonal Vectors by using the Gram-Schmidt orthogonalization process. If V is an empty list or set, GramSchmidt(V) returns an empty list or set, respectively.
The number of Vectors returned is the dimension of the vector space spanned by V. In particular, if the Vectors in V are not linearly independent, fewer Vectors than the number in V are returned.
The dimension and orientation of all Vectors in V must be the same.
The conjugate option (c) is true by default. If conjugate=false is included in the calling sequence, the elements of the second Vector are not conjugated in the dot product calculations.
The condition conjugate=true can be abbreviated to conjugate.
The normalized option (n) is false by default. If normalized=true is included in the calling sequence, this function returns an orthonormal list or set of Vectors.
The condition normalized=true can be abbreviated to normalized.
The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Vector 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). If constructor options are specified in the calling sequence, each resulting Vector has the same specified options.
This function is part of the LinearAlgebra package, and so it can be used in the form GramSchmidt(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[GramSchmidt](..).
with⁡LinearAlgebra:
w1≔2,1,0,−1:
w2≔1,0,2,−1:
w3≔0,−2,1,0:
ord≔GramSchmidt⁡w1,w2,w3
ord≔210−1,0−122−12,23−43−130
DotProduct⁡ord2,ord3
0
DotProduct⁡ord1,ord3
GramSchmidt⁡w1,w2,w3,normalized
63660−66,0−262⁢23−26,2⁢2121−4⁢2121−21210
GramSchmidt⁡1|b,1|0
1b,−11+b⁢b&conjugate0;+1−b1+b⁢b&conjugate0;
GramSchmidt⁡1|b,1|0,conjugate=false
1b,−1b2+1+1−bb2+1
See Also
LinearAlgebra[Basis]
LinearAlgebra[LUDecomposition]
Vector
Download Help Document