HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, particularly
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as :a_1x_1+\cdots +a_nx_n=b, linear maps such as :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrix (mathemat ...
and
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, the Gram–Schmidt process or Gram-Schmidt algorithm is a way of finding a set of two or more vectors that are perpendicular to each other. By technical definition, it is a method of constructing an
orthonormal basis In mathematics, particularly linear algebra, an orthonormal basis for an inner product space V with finite Dimension (linear algebra), dimension is a Basis (linear algebra), basis for V whose vectors are orthonormal, that is, they are all unit vec ...
from a set of vectors in an
inner product space In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
, most commonly the
Euclidean space Euclidean space is the fundamental space of geometry, intended to represent physical space. Originally, in Euclid's ''Elements'', it was the three-dimensional space of Euclidean geometry, but in modern mathematics there are ''Euclidean spaces ...
\mathbb^n equipped with the standard inner product. The Gram–Schmidt process takes a
finite Finite may refer to: * Finite set, a set whose cardinality (number of elements) is some natural number * Finite verb, a verb form that has a subject, usually being inflected or marked for person and/or tense or aspect * "Finite", a song by Sara Gr ...
,
linearly independent In the theory of vector spaces, a set of vectors is said to be if there exists no nontrivial linear combination of the vectors that equals the zero vector. If such a linear combination exists, then the vectors are said to be . These concep ...
set of vectors S = \ for and generates an orthogonal set S' = \ that spans the same k-dimensional subspace of \mathbb^n as S. The method is named after
Jørgen Pedersen Gram Jørgen Pedersen Gram (27 June 1850 – 29 April 1916) was a Danish actuary and mathematician who was born in Nustrup, Duchy of Schleswig, Denmark and died in Copenhagen, Denmark. Important papers of his include ''On series expansions determin ...
and
Erhard Schmidt Erhard Schmidt (13 January 1876 – 6 December 1959) was a Baltic German mathematician whose work significantly influenced the direction of mathematics in the twentieth century. Schmidt was born in Tartu (), in the Governorate of Livonia (now ...
, but
Pierre-Simon Laplace Pierre-Simon, Marquis de Laplace (; ; 23 March 1749 – 5 March 1827) was a French polymath, a scholar whose work has been instrumental in the fields of physics, astronomy, mathematics, engineering, statistics, and philosophy. He summariz ...
had been familiar with it before Gram and Schmidt. In the theory of
Lie group decompositions In mathematics, Lie group decompositions are used to analyse the structure of Lie groups and associated objects, by showing how they are built up out of subgroups. They are essential technical tools in the representation theory of Lie groups and Li ...
, it is generalized by the Iwasawa decomposition. The application of the Gram–Schmidt process to the column vectors of a full column
rank A rank is a position in a hierarchy. It can be formally recognized—for example, cardinal, chief executive officer, general, professor—or unofficial. People Formal ranks * Academic rank * Corporate title * Diplomatic rank * Hierarchy ...
matrix Matrix (: matrices or matrixes) or MATRIX may refer to: Science and mathematics * Matrix (mathematics), a rectangular array of numbers, symbols or expressions * Matrix (logic), part of a formula in prenex normal form * Matrix (biology), the m ...
yields the
QR decomposition In linear algebra, a QR decomposition, also known as a QR factorization or QU factorization, is a decomposition of a matrix ''A'' into a product ''A'' = ''QR'' of an orthonormal matrix ''Q'' and an upper triangular matrix ''R''. QR decom ...
(it is decomposed into an
orthogonal In mathematics, orthogonality (mathematics), orthogonality is the generalization of the geometric notion of ''perpendicularity''. Although many authors use the two terms ''perpendicular'' and ''orthogonal'' interchangeably, the term ''perpendic ...
and a
triangular matrix In mathematics, a triangular matrix is a special kind of square matrix. A square matrix is called if all the entries ''above'' the main diagonal are zero. Similarly, a square matrix is called if all the entries ''below'' the main diagonal are z ...
).


The Gram–Schmidt process

The
vector projection The vector projection (also known as the vector component or vector resolution) of a vector on (or onto) a nonzero vector is the orthogonal projection of onto a straight line parallel to . The projection of onto is often written as \oper ...
of a vector \mathbf v on a nonzero vector \mathbf u is defined asIn the complex case, this assumes that the inner product is linear in the first argument and conjugate-linear in the second. In physics a more common convention is linearity in the second argument, in which case we define \operatorname_ (\mathbf) = \frac \,\mathbf. \operatorname_ (\mathbf) = \frac \,\mathbf , where \langle \mathbf, \mathbf\rangle denotes the
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
of the vectors \mathbf u and \mathbf v. This means that \operatorname_ (\mathbf) is the
orthogonal projection In linear algebra and functional analysis, a projection is a linear transformation P from a vector space to itself (an endomorphism) such that P\circ P=P. That is, whenever P is applied twice to any vector, it gives the same result as if it we ...
of \mathbf v onto the line spanned by \mathbf u. If \mathbf u is the zero vector, then \operatorname_ (\mathbf) is defined as the zero vector. Given k nonzero linearly-independent vectors \mathbf_1, \ldots, \mathbf_k the Gram–Schmidt process defines the vectors \mathbf_1, \ldots, \mathbf_k as follows: \begin \mathbf_1 & = \mathbf_1, & \!\mathbf_1 & = \frac \\ \mathbf_2 & = \mathbf_2-\operatorname_ (\mathbf_2), & \!\mathbf_2 & = \frac \\ \mathbf_3 & = \mathbf_3-\operatorname_ (\mathbf_3) - \operatorname_ (\mathbf_3), & \!\mathbf_3 & = \frac \\ \mathbf_4 & = \mathbf_4-\operatorname_ (\mathbf_4)-\operatorname_ (\mathbf_4)-\operatorname_ (\mathbf_4), & \!\mathbf_4 & = \\ & \ \ \vdots & & \ \ \vdots \\ \mathbf_k & = \mathbf_k - \sum_^\operatorname_ (\mathbf_k), & \!\mathbf_k & = \frac. \end The sequence \mathbf_1, \ldots, \mathbf_k is the required system of orthogonal vectors, and the normalized vectors \mathbf_1, \ldots, \mathbf_k form an
orthonormal set In linear algebra, two vectors in an inner product space are orthonormal if they are orthogonal unit vectors. A unit vector means that the vector has a length of 1, which is also known as normalized. Orthogonal means that the vectors are all perpe ...
. The calculation of the sequence \mathbf_1, \ldots, \mathbf_k is known as ''Gram–Schmidt
orthogonalization In linear algebra, orthogonalization is the process of finding a set of orthogonal vectors that span a particular subspace. Formally, starting with a linearly independent set of vectors in an inner product space (most commonly the Euclidean s ...
'', and the calculation of the sequence \mathbf_1, \ldots, \mathbf_k is known as ''Gram–Schmidt
orthonormalization In linear algebra, orthogonalization is the process of finding a Set (mathematics), set of orthogonal vectors that span (linear algebra), span a particular linear subspace, subspace. Formally, starting with a linearly independent set of vectors ...
''. To check that these formulas yield an orthogonal sequence, first compute \langle \mathbf_1, \mathbf_2 \rangle by substituting the above formula for \mathbf_2: we get zero. Then use this to compute \langle \mathbf_1, \mathbf_3 \rangle again by substituting the formula for \mathbf_3: we get zero. For arbitrary k the proof is accomplished by
mathematical induction Mathematical induction is a method for mathematical proof, proving that a statement P(n) is true for every natural number n, that is, that the infinitely many cases P(0), P(1), P(2), P(3), \dots  all hold. This is done by first proving a ...
. Geometrically, this method proceeds as follows: to compute \mathbf_i, it projects \mathbf_i orthogonally onto the subspace U generated by \mathbf_1, \ldots, \mathbf_, which is the same as the subspace generated by \mathbf_1, \ldots, \mathbf_. The vector \mathbf_i is then defined to be the difference between \mathbf_i and this projection, guaranteed to be orthogonal to all of the vectors in the subspace U. The Gram–Schmidt process also applies to a linearly independent
countably infinite In mathematics, a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers. Equivalently, a set is ''countable'' if there exists an injective function from it into the natural numbe ...
sequence . The result is an orthogonal (or orthonormal) sequence such that for natural number : the algebraic span of \mathbf_1, \ldots, \mathbf_ is the same as that of \mathbf_1, \ldots, \mathbf_. If the Gram–Schmidt process is applied to a linearly dependent sequence, it outputs the vector on the ith step, assuming that \mathbf_i is a linear combination of \mathbf_1, \ldots, \mathbf_. If an orthonormal basis is to be produced, then the algorithm should test for zero vectors in the output and discard them because no multiple of a zero vector can have a length of 1. The number of vectors output by the algorithm will then be the dimension of the space spanned by the original inputs. A variant of the Gram–Schmidt process using
transfinite recursion Transfinite induction is an extension of mathematical induction to well-ordered sets, for example to sets of ordinal numbers or cardinal numbers. Its correctness is a theorem of ZFC. Induction by cases Let P(\alpha) be a property defined for a ...
applied to a (possibly uncountably) infinite sequence of vectors (v_\alpha)_ yields a set of orthonormal vectors (u_\alpha)_ with \kappa\leq\lambda such that for any \alpha\leq\lambda, the completion of the span of \ is the same as that of In particular, when applied to a (algebraic) basis of a
Hilbert space In mathematics, a Hilbert space is a real number, real or complex number, complex inner product space that is also a complete metric space with respect to the metric induced by the inner product. It generalizes the notion of Euclidean space. The ...
(or, more generally, a basis of any dense subspace), it yields a (functional-analytic) orthonormal basis. Note that in the general case often the strict inequality \kappa < \lambda holds, even if the starting set was linearly independent, and the span of (u_\alpha)_ need not be a subspace of the span of (v_\alpha)_ (rather, it's a subspace of its completion).


Example


Euclidean space

Consider the following set of vectors in \mathbb^2 (with the conventional
inner product In mathematics, an inner product space (or, rarely, a Hausdorff pre-Hilbert space) is a real vector space or a complex vector space with an operation called an inner product. The inner product of two vectors in the space is a scalar, ofte ...
) S = \left\. Now, perform Gram–Schmidt, to obtain an orthogonal set of vectors: \mathbf_1=\mathbf_1=\begin3\\1\end \mathbf_2 = \mathbf_2 - \operatorname_ (\mathbf_2) = \begin2\\2\end - \operatorname_ = \begin2\\2\end - \frac \begin 3 \\1 \end = \begin -2/5 \\6/5 \end. We check that the vectors \mathbf_1 and \mathbf_2 are indeed orthogonal: \langle\mathbf_1,\mathbf_2\rangle = \left\langle \begin3\\1\end, \begin -2/5 \\ 6/5 \end \right\rangle = -\frac + \frac = 0, noting that if the
dot product In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a Scalar (mathematics), scalar as a result". It is also used for other symmetric bilinear forms, for example in a pseudo-Euclidean space. N ...
of two vectors is 0 then they are orthogonal. For non-zero vectors, we can then normalize the vectors by dividing out their sizes as shown above: \mathbf_1 = \frac\begin3\\1\end \mathbf_2 = \frac \begin-2/5\\6/5\end = \frac \begin-1\\3\end.


Properties

Denote by \operatorname(\mathbf_1, \dots, \mathbf_k) the result of applying the Gram–Schmidt process to a collection of vectors \mathbf_1, \dots, \mathbf_k . This yields a map \operatorname \colon (\R^n)^ \to (\R^n)^ . It has the following properties: * It is continuous * It is
orientation Orientation may refer to: Positioning in physical space * Map orientation, the relationship between directions on a map and compass directions * Orientation (housing), the position of a building with respect to the sun, a concept in building des ...
preserving in the sense that \operatorname(\mathbf_1,\dots,\mathbf_k) = \operatorname(\operatorname(\mathbf_1,\dots,\mathbf_k)) . * It commutes with orthogonal maps: Let g \colon \R^n \to \R^n be orthogonal (with respect to the given inner product). Then we have \operatorname(g(\mathbf_1),\dots,g(\mathbf_k)) = \left( g(\operatorname(\mathbf_1,\dots,\mathbf_k)_1),\dots,g(\operatorname(\mathbf_1,\dots,\mathbf_k)_k) \right) Further, a parametrized version of the Gram–Schmidt process yields a (strong)
deformation retraction In topology, a retraction is a continuous mapping from a topological space into a subspace that preserves the position of all points in that subspace. The subspace is then called a retract of the original space. A deformation retraction is a mappi ...
of the general linear group \mathrm(\R^n) onto the orthogonal group O(\R^n).


Numerical stability

When this process is implemented on a computer, the vectors \mathbf_k are often not quite orthogonal, due to
rounding errors In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Ro ...
. For the Gram–Schmidt process as described above (sometimes referred to as "classical Gram–Schmidt") this loss of orthogonality is particularly bad; therefore, it is said that the (classical) Gram–Schmidt process is numerically unstable. The Gram–Schmidt process can be stabilized by a small modification; this version is sometimes referred to as modified Gram-Schmidt or MGS. This approach gives the same result as the original formula in exact arithmetic and introduces smaller errors in finite-precision arithmetic. Instead of computing the vector as \mathbf_k = \mathbf_k - \operatorname_ (\mathbf_k) - \operatorname_ (\mathbf_k) - \cdots - \operatorname_ (\mathbf_k), it is computed as \begin \mathbf_k^ &= \mathbf_k - \operatorname_ (\mathbf_k), \\ \mathbf_k^ &= \mathbf_k^ - \operatorname_ \left(\mathbf_k^\right), \\ & \;\; \vdots \\ \mathbf_k^ &= \mathbf_k^ - \operatorname_ \left(\mathbf_k^\right), \\ \mathbf_k^ &= \mathbf_k^ - \operatorname_ \left(\mathbf_k^\right), \\ \mathbf_k &= \frac \end This method is used in the previous animation, when the intermediate \mathbf'_3 vector is used when orthogonalizing the blue vector \mathbf_3. Here is another description of the modified algorithm. Given the vectors \mathbf_1, \mathbf_2, \dots, \mathbf_n, in our first step we produce vectors \mathbf_1, \mathbf_2^, \dots, \mathbf_n^by removing components along the direction of \mathbf_1. In formulas, \mathbf_k^ := \mathbf_k - \frac \mathbf_1. After this step we already have two of our desired orthogonal vectors \mathbf_1, \dots, \mathbf_n, namely \mathbf_1 = \mathbf_1, \mathbf_2 = \mathbf_2^, but we also made \mathbf_3^, \dots, \mathbf_n^ already orthogonal to \mathbf_1. Next, we orthogonalize those remaining vectors against \mathbf_2 = \mathbf_2^. This means we compute \mathbf_3^, \mathbf_4^, \dots, \mathbf_n^ by subtraction \mathbf_k^ := \mathbf_k^ - \frac \mathbf_2. Now we have stored the vectors \mathbf_1, \mathbf_2^, \mathbf_3^, \mathbf_4^, \dots, \mathbf_n^ where the first three vectors are already \mathbf_1, \mathbf_2, \mathbf_3 and the remaining vectors are already orthogonal to \mathbf_1, \mathbf_2. As should be clear now, the next step orthogonalizes \mathbf_4^, \dots, \mathbf_n^ against \mathbf_3 = \mathbf_3^. Proceeding in this manner we find the full set of orthogonal vectors \mathbf_1, \dots, \mathbf_n. If orthonormal vectors are desired, then we normalize as we go, so that the denominators in the subtraction formulas turn into ones.


Algorithm

The following
MATLAB MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
algorithm implements classical Gram–Schmidt orthonormalization. The vectors (columns of matrix V, so that V(:,j) is the jth vector) are replaced by orthonormal vectors (columns of U) which span the same subspace. function U = gramschmidt(V)
, k The comma is a punctuation mark that appears in several variants in different languages. Some typefaces render it as a small line, slightly curved or straight, but inclined from the vertical; others give it the appearance of a miniature fille ...
= size(V); U = zeros(n,k); U(:,1) = V(:,1) / norm(V(:,1)); for i = 2:k U(:,i) = V(:,i); for j = 1:i-1 U(:,i) = U(:,i) - (U(:,j)'*U(:,i)) * U(:,j); end U(:,i) = U(:,i) / norm(U(:,i)); end end
The cost of this algorithm is asymptotically floating point operations, where is the dimensionality of the vectors.


Via Gaussian elimination

If the rows are written as a matrix A, then applying
Gaussian elimination In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of row-wise operations performed on the corresponding matrix of coefficients. This method can a ...
to the augmented matrix \left A \right/math> will produce the orthogonalized vectors in place of A. However the matrix A A^\mathsf must be brought to
row echelon form In linear algebra, a matrix is in row echelon form if it can be obtained as the result of Gaussian elimination. Every matrix can be put in row echelon form by applying a sequence of elementary row operations. The term ''echelon'' comes from the F ...
, using only the row operation of adding a scalar multiple of one row to another. For example, taking \mathbf_1 = \begin 3 & 1\end, \mathbf_2=\begin2 & 2\end as above, we have \left A \right= \left begin 10 & 8 & 3 & 1 \\ 8 & 8 & 2 & 2\end\right/math> And reducing this to
row echelon form In linear algebra, a matrix is in row echelon form if it can be obtained as the result of Gaussian elimination. Every matrix can be put in row echelon form by applying a sequence of elementary row operations. The term ''echelon'' comes from the F ...
produces \left begin 1 & .8 & .3 & .1 \\ 0 & 1 & -.25 & .75\end\right/math> The normalized vectors are then \mathbf_1 = \frac\begin.3 & .1\end = \frac \begin3 & 1\end \mathbf_2 = \frac \begin-.25 & .75\end = \frac \begin-1 & 3\end, as in the example above.


Determinant formula

The result of the Gram–Schmidt process may be expressed in a non-recursive formula using
determinant In mathematics, the determinant is a Scalar (mathematics), scalar-valued function (mathematics), function of the entries of a square matrix. The determinant of a matrix is commonly denoted , , or . Its value characterizes some properties of the ...
s. \mathbf_j = \frac \begin \langle \mathbf_1, \mathbf_1 \rangle & \langle \mathbf_2, \mathbf_1 \rangle & \cdots & \langle \mathbf_j, \mathbf_1 \rangle \\ \langle \mathbf_1, \mathbf_2 \rangle & \langle \mathbf_2, \mathbf_2 \rangle & \cdots & \langle \mathbf_j, \mathbf_2 \rangle \\ \vdots & \vdots & \ddots & \vdots \\ \langle \mathbf_1, \mathbf_ \rangle & \langle \mathbf_2, \mathbf_ \rangle & \cdots & \langle \mathbf_j, \mathbf_ \rangle \\ \mathbf_1 & \mathbf_2 & \cdots & \mathbf_j \end \mathbf_j = \frac \begin \langle \mathbf_1, \mathbf_1 \rangle & \langle \mathbf_2, \mathbf_1 \rangle & \cdots & \langle \mathbf_j, \mathbf_1 \rangle \\ \langle \mathbf_1, \mathbf_2 \rangle & \langle \mathbf_2, \mathbf_2 \rangle & \cdots & \langle \mathbf_j, \mathbf_2 \rangle \\ \vdots & \vdots & \ddots & \vdots \\ \langle \mathbf_1, \mathbf_ \rangle & \langle \mathbf_2, \mathbf_ \rangle & \cdots & \langle \mathbf_j, \mathbf_ \rangle \\ \mathbf_1 & \mathbf_2 & \cdots & \mathbf_j \end where D_0 = 1 and, for j \ge 1, D_j is the
Gram determinant In linear algebra, the Gram matrix (or Gramian matrix, Gramian) of a set of vectors v_1,\dots, v_n in an inner product space is the Hermitian matrix of inner products, whose entries are given by the inner product G_ = \left\langle v_i, v_j \right\r ...
D_j = \begin \langle \mathbf_1, \mathbf_1 \rangle & \langle \mathbf_2, \mathbf_1 \rangle & \cdots & \langle \mathbf_j, \mathbf_1 \rangle \\ \langle \mathbf_1, \mathbf_2 \rangle & \langle \mathbf_2, \mathbf_2 \rangle & \cdots & \langle \mathbf_j, \mathbf_2 \rangle \\ \vdots & \vdots & \ddots & \vdots \\ \langle \mathbf_1, \mathbf_j \rangle & \langle \mathbf_2, \mathbf_j \rangle & \cdots & \langle \mathbf_j, \mathbf_j \rangle \end. Note that the expression for \mathbf_k is a "formal" determinant, i.e. the matrix contains both scalars and vectors; the meaning of this expression is defined to be the result of a
cofactor expansion In linear algebra, the Laplace expansion, named after Pierre-Simon Laplace, also called cofactor expansion, is an expression of the determinant of an -matrix as a weighted sum of minors, which are the determinants of some - submatrices of . Spe ...
along the row of vectors. The determinant formula for the Gram-Schmidt is computationally (exponentially) slower than the recursive algorithms described above; it is mainly of theoretical interest.


Expressed using geometric algebra

Expressed using notation used in
geometric algebra In mathematics, a geometric algebra (also known as a Clifford algebra) is an algebra that can represent and manipulate geometrical objects such as vectors. Geometric algebra is built out of two fundamental operations, addition and the geometric pr ...
, the unnormalized results of the Gram–Schmidt process can be expressed as \mathbf_k = \mathbf_k - \sum_^ (\mathbf_k \cdot \mathbf_j)\mathbf_j^\ , which is equivalent to the expression using the \operatorname operator defined above. The results can equivalently be expressed as \mathbf_k = \mathbf_\wedge\mathbf_\wedge\cdot\cdot\cdot\wedge\mathbf_(\mathbf_\wedge\cdot\cdot\cdot\wedge\mathbf_)^, which is closely related to the expression using determinants above.


Alternatives

Other
orthogonalization In linear algebra, orthogonalization is the process of finding a set of orthogonal vectors that span a particular subspace. Formally, starting with a linearly independent set of vectors in an inner product space (most commonly the Euclidean s ...
algorithms use
Householder transformation In linear algebra, a Householder transformation (also known as a Householder reflection or elementary reflector) is a linear transformation that describes a reflection (mathematics), reflection about a plane (mathematics), plane or hyperplane conta ...
s or
Givens rotation In numerical linear algebra, a Givens rotation is a rotation in the plane spanned by two coordinates axes. Givens rotations are named after Wallace Givens, who introduced them to numerical analysts in the 1950s while he was working at Argonne Natio ...
s. The algorithms using Householder transformations are more stable than the stabilized Gram–Schmidt process. On the other hand, the Gram–Schmidt process produces the jth orthogonalized vector after the jth iteration, while orthogonalization using Householder reflections produces all the vectors only at the end. This makes only the Gram–Schmidt process applicable for
iterative method In computational mathematics, an iterative method is a Algorithm, mathematical procedure that uses an initial value to generate a sequence of improving approximate solutions for a class of problems, in which the ''i''-th approximation (called an " ...
s like the
Arnoldi iteration In numerical linear algebra, the Arnoldi iteration is an eigenvalue algorithm and an important example of an iterative method. Arnoldi finds an approximation to the eigenvalues and eigenvectors of general (possibly non- Hermitian) matrices by c ...
. Yet another alternative is motivated by the use of
Cholesky decomposition In linear algebra, the Cholesky decomposition or Cholesky factorization (pronounced ) is a decomposition of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose, which is useful for eff ...
for inverting the matrix of the normal equations in linear least squares. Let V be a full column rank matrix, whose columns need to be orthogonalized. The matrix V^* V is
Hermitian {{Short description, none Numerous things are named after the French mathematician Charles Hermite (1822–1901): Hermite * Cubic Hermite spline, a type of third-degree spline * Gauss–Hermite quadrature, an extension of Gaussian quadrature me ...
and positive definite, so it can be written as V^* V = L L^*, using the
Cholesky decomposition In linear algebra, the Cholesky decomposition or Cholesky factorization (pronounced ) is a decomposition of a Hermitian, positive-definite matrix into the product of a lower triangular matrix and its conjugate transpose, which is useful for eff ...
. The lower triangular matrix L with strictly positive diagonal entries is
invertible In mathematics, the concept of an inverse element generalises the concepts of opposite () and reciprocal () of numbers. Given an operation denoted here , and an identity element denoted , if , one says that is a left inverse of , and that ...
. Then columns of the matrix U = V\left(L^\right)^* are
orthonormal In linear algebra, two vectors in an inner product space are orthonormal if they are orthogonal unit vectors. A unit vector means that the vector has a length of 1, which is also known as normalized. Orthogonal means that the vectors are all perpe ...
and span the same subspace as the columns of the original matrix V. The explicit use of the product V^* V makes the algorithm unstable, especially if the product's
condition number In numerical analysis, the condition number of a function measures how much the output value of the function can change for a small change in the input argument. This is used to measure how sensitive a function is to changes or errors in the inpu ...
is large. Nevertheless, this algorithm is used in practice and implemented in some software packages because of its high efficiency and simplicity. In
quantum mechanics Quantum mechanics is the fundamental physical Scientific theory, theory that describes the behavior of matter and of light; its unusual characteristics typically occur at and below the scale of atoms. Reprinted, Addison-Wesley, 1989, It is ...
there are several orthogonalization schemes with characteristics better suited for certain applications than original Gram–Schmidt. Nevertheless, it remains a popular and effective algorithm for even the largest electronic structure calculations.


Run-time complexity

Gram-Schmidt orthogonalization can be done in strongly-polynomial time. The run-time analysis is similar to that of
Gaussian elimination In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of row-wise operations performed on the corresponding matrix of coefficients. This method can a ...
.


See also

*
Linear algebra Linear algebra is the branch of mathematics concerning linear equations such as :a_1x_1+\cdots +a_nx_n=b, linear maps such as :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrix (mathemat ...
*
Recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
*
Orthogonality (mathematics) In mathematics, orthogonality is the generalization of the geometric notion of ''perpendicularity'' to linear algebra of bilinear forms. Two elements and of a vector space with bilinear form B are orthogonal when B(\mathbf,\mathbf)= 0. Depend ...


References


Notes


Sources

* . * . * . * .


External links

*
Harvey Mudd College Math Tutorial on the Gram-Schmidt algorithm


The entry "Gram-Schmidt orthogonalization" has some information and references on the origins of the method. * Demos
Gram Schmidt process in plane
an
Gram Schmidt process in space




* Proof: ttp://planetmath.org/ProofOfGramSchmidtOrthogonalizationProcedure Raymond Puzio, Keenan Kidwell. "proof of Gram-Schmidt orthogonalization algorithm" (version 8). PlanetMath.org. {{DEFAULTSORT:Gram-Schmidt Process Linear algebra Functional analysis Articles with example MATLAB/Octave code