orth

Orthonormal basis of the range of a matrix.

Category: Mathematics > Linear Algebra

Syntax

Q = orth(A)

Returns orthonormal columns spanning the column space of A.

Description

orth takes the left singular vectors of A that correspond to singular values above a tolerance. The columns of the result are unit length and mutually perpendicular, and every column of A is a combination of them.

For a rank-deficient A the result has fewer columns than A. The basis is unique only up to sign and rotation within the space.

Input arguments

A
Matrix.

Output arguments

Q
Matrix with rank(A) orthonormal columns and size(A,1) rows.

Example

A rank-one matrix has a one-column basis

A = [1 1; 1 1];
Q = orth(A)
size(orth([1 2; 3 4]))
Output
Q = 2×1

    0.7071
    0.7071
ans = 1×2

     2     2

See also

null rank qr svd