Subspaces Angle (1D) VI
- Updated2025-07-30
- 2 minute(s) read
Computes the angle between column spaces of two matrices.
Wire data to the A and B inputs to determine the polymorphic instance to use or manually select the instance.

Inputs/Outputs
A
—
A is a real vector.
B
—
B is a real vector. The length of B must equal the length of A.
angle
—
angle returns the angle (in radians) between the column subspaces of A and B.
error
—
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
Let U1S1V1T and U2S2V2T be the singular value decomposition of A and B, respectively. The following equation defines the angle between the Euclidean subspaces that span columns of A and B.
angle = arccos(s)where s is the minimum singular value of U1TU2
If A and B are both vectors, the previous equation equals the following equation.
where the norm symbols (||.||) compute the 2-norm of the input vectors.
A
—
angle
—
error
—