Gram-Schmidt Calculator - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim

Home : Support : Online Help : Math Apps : Algebra and Geometry : Matrices : Gram-Schmidt Calculator

Gram-Schmidt Calculator

Main Concept

Inner product spaces are one of the most important concepts in linear algebra.

What is an Inner Product?

An inner product is an operation defined in a vector space that takes two vectors as parameters and produces a scalar (usually a real or a complex number) as a result. In general, inner products are denoted as C ·, · D. Specifically, the inner product of the elements a and b of the vector space V is written as: Ca, bD. For an operation to be an inner product in a vector space V, it must satisfy the following axioms.

For all x, y, z ∈ V and α a scalar of the field where the vector space is defined:


Bilinearity in the first argument:  Cα⋅x, yD = α⋅Cx, yD and Cx + z, yD = Cx, yD + Cz, yD.


Conjugate Symmetry:  Cx, yD = y, x where y, x denotes the complex conjugate of Cx, yD.


Positive Definiteness:  For all non-zero x ∈ V, Cx, xD > 0.

A complex inner product is an inner product where the resulting scalar is a complex number.

A real inner product is an inner product where the resulting scalar is a real number.

What is Gram-Schmidt Orthogonalization?

A set of non-zero vectors from a vector space is said to be orthogonal if the inner product between any two vectors in the set is equal to 0. A set of vectors is said to be orthonormal if the set is orthogonal and if for any vector v in the set we have: Cv,vD = 1.

The Gram-Schmidt theorem states that given any set of linearly independent vectors from a vector space, it is always possible to generate an orthogonal set with the same number of vectors as the original set. The way to generate this set is by constructing it from the original set of vectors by using Gram-Schmidt's orthogonalization process:

If the projection of v onto u is given by proj__uv=v,uu,uu, then form a sequence of vectors as follows:




The sequence u__1,u__2,...u__k will be the required set of orthogonal vectors.



This calculator applies the Gram-Schmidt orthogonalization process to the columns of a matrix or to a set of vectors. By default, it performs the exact computation (as opposed to decimal approximations), and performs orthonormalization.

Select the Orthogonalization option if you want to orthogonalize your input instead of orthonormalizing it.


Select Complex Inner Product if your entries include complex numbers instead of real numbers.


If the input matrix or vectors contains floating point numbers, or if the Floating-Point Calculations option is selected, the Gram-Schmidt process will be carried out using floating point arithmetic, which necessarily introduces round-off error.  As a result, linear dependence of the vectors (or less than full rank of the matrix) is not likely to be detected.  In the floating-point domain, the singular value decomposition is a much superior method for obtaining an orthogonal basis for the span of a set of vectors.

Problem Entry

To enter your matrix or vectors, you can use palettes or keyboard shortcuts.


To use palettes, right-click in the entry box and select the Matrix button:   (in a web browser), or open the Matrix palette (Maple and the Maple Player).  Use the palette to enter your matrix (the process will be applied to the columns) or column vectors. When entering vectors, separate your vectors by commas: 1 2, 41

To enter vectors using the keyboard, use angle brackets to define your vector, and separate vectors by commas.
For example, enter <1,2>, <4,4>  or  <1,2,3>, <4,-1,2>, <11, 3/2, 0>


To enter a matrix using the keyboard, enter each column as a vector, separate columns by vertical bars, and encase the whole thing in angle brackets.
For example, to enter 1351, use: < <1, -5> | <3, -1> >.

Enter vectors for Gram-Schmidt:



Calculation and output form:


More MathApps