<s>[INST] 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.
 [/INST] 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.
</s>