subspace

Purpose

Angle between two subspaces.

Synopsis

t = subspace(A,B)

Description

t = subspace(A,B) finds the angle between two subspaces specified by the columns of A and B. If A and B are vectors of unit length, this is the same as acos(A'*B).

Examples

If the angle between the two subspaces is small, the two spaces are nearly linearly dependent. In a physical experiment described by some observations A, and a second realization of the experiment described by B, subspace(A,B) gives a measure of the amount of new information afforded by the second experiment not associated with statistical errors of fluctuations.

For example, consider a study that requires two groups of medical patients, a control group and a test group. Assume that data exists for several groups of patients, and this data is organized into one matrix per group. Each row of a matrix represents various test results for a single patient. The two groups with the smallest returned angle are the most similar with regard to these test results.

(c) Copyright 1994 by The MathWorks, Inc.