Let $\mathbf{x}$ be a $N$-dimensional random vector with independent Gaussian entries, i.e., $\mathbf{x} \sim \mathcal{N}(0, \mathbf{I}_{N})$. Furthermore, let $\mathbf{a}_{1} \in \mathbb{R}^{N}$ and $\mathbf{a}_{2} \in \mathbb{R}^{N}$ be two given vectors. I'd like to derive the expression of \begin{align} \mathbb{E}[\mathrm{sgn}(\mathbf{a}_{1}^{T} \mathbf{x}) \mathrm{sgn}(\mathbf{a}_{2}^{T} \mathbf{x})] & = \mathbb{P}[\mathbf{a}_{1}^{T} \mathbf{x} > 0 \land \mathbf{a}_{2}^{T} \mathbf{x} >0] \\ & \ \ \ \ + \mathbb{P}[\mathbf{a}_{1}^{T} \mathbf{x} > 0 \land \mathbf{a}_{2}^{T} \mathbf{x} < 0] \\ & \ \ \ \ - \mathbb{P}[\mathbf{a}_{1}^{T} \mathbf{x} < 0 \land \mathbf{a}_{2}^{T} \mathbf{x} > 0] \\ & \ \ \ \ - \mathbb{P}[\mathbf{a}_{1}^{T} \mathbf{x} < 0 \land \mathbf{a}_{2}^{T} \mathbf{x} < 0]. \end{align}
Edit: I found the answer to be
$$\mathbb{E}[\mathrm{sgn}(\mathbf{a}_{1}^{T} \mathbf{x}) \mathrm{sgn}(\mathbf{a}_{2}^{T} \mathbf{x})] = \frac{2}{\pi} \arcsin \bigg( \frac{\mathbf{a}_{1}^{T} \mathbf{a}_{2}}{\|\mathbf{a}_{1}\| \, \|\mathbf{a}_{2}\|} \bigg)$$
but I cannot understand the reasoning behind this formula. Furthermore, I'd like to understand how to obtain the individual joint probability terms, e.g., $\mathbb{P}[\mathbf{a}_{1}^{T} \mathbf{x} > 0 \land \mathbf{a}_{2}^{T} \mathbf{x} >0]$. A proof or rigorous explanation will be most welcome.
Suppose $X\sim N_n(0,I_n)$ and $U=a_1^TX$, $V=a_2^TX$, $W=a_3^TX$ for vectors $a_1,a_2,a_3\in \mathbb R^n$.
Then $(U,V)$ is bivariate normal with mean vector $0$, $\mathbb{Var}(U)=\lVert a_1 \rVert^2$, $\mathbb{Var}(V)=\lVert a_2 \rVert^2$ and $\mathbb{Cov}(U,V)=a_1^Ta_2$, i.e. with correlation $\rho_{U,V}=\frac{a_1^Ta_2}{\lVert a_1 \rVert \lVert a_2 \rVert}$.
The main result here is this one, which says
$$\mathbb P\left[U>0,V>0\right]=\mathbb P\left[\frac{U}{\lVert a_1 \rVert}>0,\frac{V}{\lVert a_2 \rVert}>0\right]=\frac14+\frac1{2\pi}\arcsin(\rho_{U,V})\tag{1}$$
Due to symmetry, observe that $(U,V)\stackrel{d}= (-U,-V)$ and $(-U,V)\stackrel{d}=(U,-V)$.
Now $\mathbb E\left[\operatorname{sgn}(U)\operatorname{sgn}(V)\right]$ equals
$$\mathbb P[U>0,V>0]+\mathbb P[-U>0,-V>0]-\mathbb P[-U>0,V>0]-\mathbb P[U>0,-V>0]\,,$$
which reduces to $$\mathbb E\left[\operatorname{sgn}(U)\operatorname{sgn}(V)\right]=2\mathbb P\left[U>0,V>0\right]-2\mathbb P\left[-U>0,V>0\right]\,.$$
As $(-U,V)$ is bivariate normal with correlation $-\rho_{U,V}$, we only need $(1)$ to conclude
$$\mathbb E\left[\operatorname{sgn}(U)\operatorname{sgn}(V)\right]=\frac2{\pi}\arcsin(\rho_{U,V})=\frac2{\pi}\arcsin\left(\frac{a_1^Ta_2}{\lVert a_1 \rVert \lVert a_2 \rVert}\right)\,.$$
Again $(U,V,W)$ is trivariate normal, so using this extension to three dimensions we have
\begin{align} \mathbb P\left[U>0,V>0,W>0\right]&=\mathbb P\left[\frac{U}{\lVert a_1 \rVert}>0,\frac{V}{\lVert a_2 \rVert}>0,\frac{W}{\lVert a_3 \rVert}>0\right] \\&=\frac18+\frac1{4\pi}\left(\arcsin(\rho_{U,V})+\arcsin(\rho_{V,W})+\arcsin(\rho_{U,W})\right)\,. \end{align}