Calculating angles between matrices

  • Context: Graduate 
  • Thread starter Thread starter spicytaco
  • Start date Start date
  • Tags Tags
    Angles Matrices
Click For Summary

Discussion Overview

The discussion revolves around calculating angles between matrices and functions using defined inner products. Participants explore the application of inner products to determine angles in both matrix and function contexts, touching on theoretical aspects and practical implications.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Exploratory

Main Points Raised

  • One participant asks how to calculate the angle between two square matrices using the inner product defined as the trace of the product of the transpose of one matrix and the other.
  • Another participant states that the formula for cosine of the angle between two elements can be applied to both matrices and functions, emphasizing the use of the inner product.
  • A participant explains the relationship between the dot product and angles in vector spaces, suggesting that the concept extends to more abstract vector spaces through the definition of vector length and angle.
  • One participant calculates the angle between two vectors derived from the matrices, providing a specific cosine value and an approximate angle in degrees, while also discussing the implications of the inner product definition.
  • For the functions example, a participant notes that there isn't a direct analogy but reiterates the application of the inner product formula to find the angle.

Areas of Agreement / Disagreement

Participants generally agree on the applicability of inner products to define angles in both matrices and functions. However, there is no consensus on the usefulness of these angles in specific problem contexts, and the discussion includes varying interpretations of the relationship between angles and inner products.

Contextual Notes

Some limitations are noted regarding the analogy between angles in vector spaces and those in function spaces, as well as the potential ambiguity in the usefulness of the calculated angles for specific problems.

spicytaco
Messages
2
Reaction score
0
Hey all,

I was hoping someone could explain to me how to calculate the angle between matrices, ie. two square matrices

[ 2 0
0 -1]

and

[0 1
1 3^(1/2)]

under the inner product <A|B> = trace (A^TB)

Also, how would you go about determining an angle between x and y when they are functions, ie. x = f(x) = x^2 +2 and y=(g(x)=x^3 -7x, under the inner product below:

⟨f |g⟩ =
1
∫ f (x)g(x)dx.
−1

I already know how to determine angle using cos theta = (x^Ty)/ ||x|| ||y|| but does this only work for column and row matrices?
 
Physics news on Phys.org
Any time you have an inner product, you can use it to define angles between elements using the usual formula:
[tex] \cos\theta(a,b) = \frac{\langle a | b \rangle}{\sqrt{\langle a | a \rangle \langle b | b \rangle}}[/tex]
This works equally well for your matrices and for your functions.

Whether that angle tells you anything useful for the problem you're trying to solve is another question. :)
 
Thanks so much!
 
For "vectors in space", two or three dimensions, you can use trigonometry to prove that the dot product of two vectors, u and v, are given by [itex]u\cdot v= |u||v|cos(\theta)[/itex] where |u| and |v| are the lengths of the two vectors and [itex]\theta[/itex] is the angle between them. For more abstract vector spaces, we define the length of a vector, v, to be [itex]\sqrt{<v, v>}[/itex] and the angle between u and v to be given by
[tex]cos(\theta)= \frac{<u, v>}{|u||v|}[/tex]
 
In spicytaco's matrix example the angle is the same as the angle for the two vectors (2,0,0,-1) and (0,1,1, 3^1/2) in R^4 with usual euclidean norm.

(2,0,0,-1).(0,1,1,3^1/2) = 0 + 0 + 0 - 3^1/2

|(2,0,0,-1)| = 5^1/2
|(0,1,1,3^1/2)| = 5^1/2

so cos(theta) = (-3^1/2)/5 (theta ~= 110 degrees)

this is why the inner product is defined as trace(A^T.B), for nxn matrices you get R^(n^2) euclidean space with two vectors defined by joining the columns of A and the other by the columns of B.

For the functions example there isn't a "natural" analogy but the answer has been given above, you just plug in the formula for the inner product into the equation for cos(theta)
 
Last edited:

Similar threads

  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 26 ·
Replies
26
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
13
Views
4K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K