subspace {TRES}R Documentation

The distance between two subspaces.

Description

This function calculates the distance between the two subspaces with equal dimensions span(A)(A) and span(B)(B), where ARp×uA \in R^{p\times u} and BRp×uB \in R^{p\times u} are the basis matrices of two subspaces. The distance is defined as

PAPBF/2d,\|P_{A} - P_{B}\|_F/\sqrt{2d},

where PP is the projection matrix onto the given subspace with the standard inner product, and dd is the common dimension.

Usage

subspace(A, B)

Arguments

A

A pp-by-uu full column rank matrix.

B

A pp-by-uu full column rank matrix.

Value

Returns a distance metric that is between 0 and 1


[Package TRES version 1.1.5 Index]