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.


icon

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.