Calculate the angle enclosed two lines by means of the scalar product

138 Views Asked by At

What is the angle between a side and the diagonal of the unit square?

what is the angle between the body diagonal and a touching edge of an n-dimensional unit hypercube?

1

There are 1 best solutions below

0
On BEST ANSWER

Try laying the unit cube in a space with one of its vertices in the origin .

Meaning the the other point of the body diagonal will have all the coordinates 1 ie for a 3 D cube it is (1,1,1) , 4D it is (1,1,1,1). . etc

So the vector from origin to the opposite will be $\vec u = i+j+k+\cdots$ with $n$ units vectors in $n $ dimensions. the side will always be a unit vector in only one direction such as $\vec a = i$

$\cos(\theta) = \dfrac{\vec a . \vec u}{|\vec a||\vec u|}\implies\theta = \arccos\left(\frac{\vec a.\vec u}{|\vec a||\vec u|}\right)$

$|\vec a| = 1$

$\vec a.\vec u = 1$

$|\vec u| = \sqrt n$

So generally for $n$ dimensions ;

$\theta= \arccos\left(\frac1{\sqrt n}\right)$