Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the angle between two subspaces
ResourceFunction["SubspaceAngle"][u,v] gives the angle between two subspaces specified by the columns of the matrices u and v. |
Compute the angle between two subspaces:
| In[1]:= | ![]() |
| Out[3]= |
Find the subspace angle between a vector and a matrix:
| In[4]:= | ![]() |
| Out[4]= |
Find the subspace angle between different sets of columns of a complex matrix:
| In[5]:= |
| In[6]:= |
| Out[6]= |
For two vectors, SubspaceAngle gives the same result as VectorAngle:
| In[7]:= |
| Out[7]= |
| In[8]:= |
| Out[8]= |
Use SubspaceAngle to compute the angle between two planes by specifying the vectors spanning each plane as matrix columns:
| In[9]:= | ![]() |
| Out[9]= |
Use DihedralAngle to compute the same result:
| In[10]:= |
| Out[10]= |
This work is licensed under a Creative Commons Attribution 4.0 International License