Let $(a,b)_K$ be the quadratic Hilbert symbol in a local field $K$. Let $a$ be a rational number. By a consequence of the quadratic reciprocity law we have: $$\prod_{p} (a,1)_{\mathbb{Q}_p}=\mathrm{sgn}(a),$$ where $\mathrm{sgn}(a)$ is the sign of $a$. My question is if this formula can be generalized to a totally real number field.

7$\begingroup$ For a number field $K$, consider the quaternion algebra $Q$ generated by $a,b\in (K^\times)\setminus (K^\times)^2$. This gives a $2$torsion element in the Brauer group of $K$. There is a reciprocity short exact sequence $0\to \text{Br}(K) \to \bigoplus_v \text{Br}(K_v) \xrightarrow{\text{inv}} \mathbb{Q}/\mathbb{Z} \to 0$ where the middle term is the "restricted product" over all places $v$ of the Brauer group of the completed field. Thus, the sum over all real embeddings of $(1)^{\text{sign}(ab)}$ equals the sum of invariants of $Q$ at nonArchimedean places. $\endgroup$ – Jason Starr Aug 10 '18 at 19:58

2$\begingroup$ Typo correction: "$(1)^{\text{sign}(ab)}$" should be $\overline{0}\in (\mathbb{Z}(1/2))/\mathbb{Z}$ if the sign is $+1$ and $\overline{1/2}$ if the sign is $1$. $\endgroup$ – Jason Starr Aug 10 '18 at 20:10

6$\begingroup$ It is not clear how your question is related to real algebraic geometry. Unless you explain this, please modify the title accordingly. $\endgroup$ – GH from MO Aug 10 '18 at 21:48

$\begingroup$ The relationship with real algebraic geometry is that in $\mathbb{Q}$ the positive conus of the elements in the form $a=X_1^2+\dots+X_n^2$ is exactly those such that $\prod_p (a,1)_p=1$, my question is if it can be generalizated. $\endgroup$ – camilo Aug 13 '18 at 19:03