Angle between edges in a square pyramid 
How do you calculate the missing angle? I couldn't figure it out. This is not homework, just a math practice question that I made up to test myself.
 A: First proof by analytical geometry.
Let 


*

*$A(1,1,0),B(1,-1,0),C(-1,-1,0),D(-1,1,0)$ be the basis' vertices, 

*$S(0,0,z)$ be the summit, with unknown $z$ and 

*$a=SA=SB=SC=SD$.

*$\alpha$ be the unknown angle between $\vec{SA}$ and $\vec{SC}$.
Then $\tag{1} \cases{\vec{SA}=(1,1,0)-(0,0,z)=(1,1,-z)\\ \vec{SB}=(1,-1,0)-(0,0,z)=(1,-1,-z)\\ \vec{SC}=(-1,-1,0)-(0,0,z)=(-1,-1,-z)} $
A first consequence is that $\tag{2}a^2=\vec{SA}^2=2+z^2.$
Now, using the two forms of the dot product:
$$\tag{3}\vec{SA}.\vec{SB}=\cases{\|SA\|\|SB\|\cos(ASB)=a^2 \cos(\frac{\pi}{4})=\frac{\sqrt{2}}{2}a^2\\(1) \times (1) + (1) \times (-1)+(-z) \times (-z)=z^2}$$
giving : $\tag{4}a^2=\sqrt{2}z^2$
With (2} and {4}, we deduce the values $\tag{5}\cases{z^2=2+2\sqrt{2}\\a^2=4+2\sqrt{2}}$
Expressing as in (3), $\vec{SA}.\vec{SC}$ in two ways, that the unknown angle $\alpha$ is such that, using (1),
$$\tag{4}\vec{SA}.\vec{SC}=\cases{\cos(\alpha)a^2\\(1) \times (-1) + (1) \times (-1)+(-z) \times (-z)=z^2-2}$$
Thus $\cos(\alpha)=\dfrac{z^2-2}{a^2}$. Using (4), one obtains:
$\cos(\alpha)=\frac{2\sqrt{2}}{4+2\sqrt{2}}=\frac{1}{1+\sqrt{2}}=\sqrt{2}-1.$
The final result is $\alpha=acos(\sqrt{2}-1)\approx 1.14372 rad.$
i.e. close to $55^{\circ}1/2$.
Second proof by law of cosines (applied twice) (see (https://en.wikipedia.org/wiki/Law_of_cosines))
We take the same conventions as in the previous proof. 
In triangle SAB: $\ AB^2=SA^2+SB^2-2 SA.SB \cos(\pi/4).$
giving $2^2=a^2+a^2-2a^2 \cos(\frac{\pi}{4})$ out of which we obtain 
$$\tag{5}a^2=2(2+\sqrt{2}).$$
In triangle SAC: $\ AC^2=SA^2+SC^2-2 SA.SC \cos(\alpha)$
giving $(2 \sqrt{2})^2=a^2+a^2-2a^2 \cos(\alpha).$
or $\tag{6}4=a^2(1- \cos(\alpha)).$
Using (5) in (6), we are able to deduce 
$$\cos(\alpha)=1-\frac{4}{a^2}=1-\frac{2}{2+\sqrt{2}}=1-\frac{\sqrt{2}}{1+\sqrt{2}}=1-\sqrt{2}(\sqrt{2}-1)=\sqrt{2}-1$$ as before.
A: Let the side S=1 and use trigonometry

A: Two neighboring oblique sides have directions $(1,1,h)$ and $(-1,1,h)$ and must be such that
$$\cos\alpha=\cos\frac\pi4=\frac{(1,1,h)}{\sqrt{2+h^2}}\cdot\frac{(-1,1,h)}{\sqrt{2+h^2}}=\frac{h^2}{h^2+2}.$$
Then taking to opposite sides,
$$\cos\beta=\frac{(1,1,h)}{\sqrt{2+h^2}}\cdot\frac{(-1,-1,h)}{\sqrt{2+h^2}}=\frac{h^2-2}{h^2+2}=2\frac{h^2}{h^2+2}-1.$$
Hence
$$\cos\beta=\sqrt2-1.$$

We can also perform the computation using spherical coordinates to represent unit vectors $$(\cos\theta\cos\phi,\sin\theta\cos\phi,\sin\phi).$$
Then as above, with $\theta=0,\pi/2$ and$\pi$,
$$\cos\alpha=(\cos\phi,0,\sin\phi)\cdot(0,\cos\phi,\sin\phi)=\sin^2\phi,$$
$$\cos\beta=(\cos\phi,0,\sin\phi)\cdot(-\cos\phi,0,\sin\phi)=\sin^2\phi-\cos^2\phi=2\cos\alpha-1.$$
A: You can get all the angles, once you have the vectors corresponding to each side.
In your case, put the center of the base at the origin, call $h$ the height, determine what $h$ shall be in order to get $\pi /4$ as the given angle. Then you have all the vectors.
