linalg(deprecated)
GramSchmidt
compute orthogonal vectors
Calling Sequence
Parameters
Description
Examples
GramSchmidt([v1, v2, ... , vn], opt)
GramSchmidt({v1, v2, ... , vn}, opt)
v[1], v[2], ..., v[n]
-
linearly independent vectors
opt
(optional) the word 'normalized'
Important: The linalg package has been deprecated. Use the superseding command, LinearAlgebra[GramSchmidt], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The function GramSchmidt computes a list or set of orthogonal vectors from a given list or set of linearly independent vectors, using the Gram-Schmidt orthogonalization process.
The vectors given must be linearly independent, otherwise the vectors returned will also be dependent.
The vectors returned are normalized only if 'normalized' is specified.
The command with(linalg,GramSchmidt) allows the use of the abbreviated form of this command.
with⁡linalg:
v1≔vector⁡1,0,0
v1≔100
v2≔vector⁡1,1,0
v2≔110
v3≔vector⁡1,1,1
v3≔111
GramSchmidt⁡v1,v2,v3
0,0,1,0,1,0,1,0,0
u1≔vector⁡2,2,2
u1≔222
u2≔vector⁡0,2,2
u2≔022
u3≔vector⁡0,0,2
u3≔002
GramSchmidt⁡u1,u2,u3
2,2,2,−43,23,23,0,−1,1
GramSchmidt⁡u1,u2,u3,normalized
333333,−8⁢368⁢3128⁢312,0−2222
See Also
linalg(deprecated)[basis]
linalg(deprecated)[intbasis]
linalg(deprecated)[norm]
LinearAlgebra
Download Help Document