Connection between vector scalar product and trace of matrix product Given 2 vectors $\vec{s^{\prime}}$, $\vec{t^{\prime}}$ and $S^{\prime}=\vec{s^{\prime}} \cdot \vec{\sigma}$, $T=\vec{t^{\prime}} \cdot \vec{\sigma}$. The following equations are given
\begin{equation}
\begin{aligned}
\overrightarrow{s^{\prime}} \cdot \overrightarrow{t^{\prime}} &=\frac{1}{2} \operatorname{tr}\left[S^{\prime} T^{\prime}\right] \\
&=\frac{1}{2} \operatorname{tr}\left[\left(U S U^{\dagger}\right)\left(U T U^{\dagger}\right)\right] \\
&=\frac{1}{2} \operatorname{tr}[S T] \\
&=\vec{s} \cdot \vec{t}
\end{aligned}
\end{equation}
Taken from this website (https://qubit.guide/3.4-unitaries-as-rotations.html)
I don't understand the first line (how the scalar product of 2 vectors is related to the product of the relevant matrices). Is this a special property of spin rotation operator ? A more detailed derivation of the first line or links to the topic would be much appreciated!
 A: That's just a calculation. Let
$$S = s_1 \sigma_1 + s_2 \sigma_2 + s_3 \sigma_3 \,(= \vec{s} \cdot \vec{\sigma})$$
$$T = t_1 \sigma_1 + t_2 \sigma_2 + t_3 \sigma_3 \,(= \vec{t} \cdot \vec{\sigma})$$
Then
$$ ST = s_1 t_1 \sigma_1^2 + s_2 t_2 \sigma_2^2 + s_3 t_3  \sigma_3^2
+ \text{mixed terms} $$
You should know that
$$ \sigma_i \sigma_j = \delta_{ij}\, \text{Id} + \varepsilon_{ijk}\sigma_k$$
so the mixed terms are of the form $s_i t_j \sigma_k$ (times $\pm 1$). These have all zero trace (by inspection).
The terms with the squares are just of the form $s_i t_i \, \text{Id}$ where Id is the $2\times 2 $ identity matrix, which has trace $=2s_i t_i$, so their sum is twice the scalar product in question.
Note: the site you are looking at seems to assume that readers are willing to sit down with a piece of paper and derive some of the equations by themselves, e.g. by calculation. I personally think that this is a good thing, but it may be too fast a pace for others. If that applies to you consider using a textbook providing these details (I found, e.g., W. Scherer's book "Mathematics of Quantum Computing" quite comprehensive in that respect).
A: This is a reference to the correspondence between the Pauli matrices and an orthonormal basis of vectors of the Clifford algebra $Cl^3$, also called a Geometric Algebra. Matrix addition and multiplication corresponds to addition and the geometric product in the Geometric Algebra. Elements of a Geometric Algebra are called multivectors, and can be linear combinations of different grades: scalars (grade 0), vectors (grade 1), bivectors (grade 2), and so on.
Pauli used a matrix representation to get the necessary non-commutative algebraic relationships, but it is easier and conceptually cleaner to use the Geometric Algebra directly. There is then no need for complex numbers, and the geometric meaning of the Pauli matrices is much clearer. There is nothing specific to quantum mechanics about the Pauli spin matrices, or even specific to spin. They are simply the $x$, $y$, and $z$ unit vectors in space.
The matrix representations for a complete basis of the Geometric Algebra $Cl^3$ is as follows:
Scalars:
$1=\pmatrix{1 & 0 \\ 0 & 1}$
Vectors:
$\sigma_x=\pmatrix{0 & 1 \\ 1 & 0}$,
$\sigma_y=\pmatrix{0 & -i \\ i & 0}$, $\sigma_z=\pmatrix{1 & 0 \\ 0 & -1}$
Bivectors:
$\sigma_{yz}=\pmatrix{0 & i \\ i & 0}$,
$\sigma_{xz}=\pmatrix{0 & -1 \\ 1 & 0}$, $\sigma_{xy}=\pmatrix{i & 0 \\ 0 & -i}$
Trivectors:
$\sigma_{xyz}=\pmatrix{i & 0 \\ 0 & i}$
The Pauli matrices satisfy the defining relationships of an orthonormal basis of the Clifford algebra.
The square of any vector is a scalar, and equal to its length squared.
$\sigma_x^2=\sigma_y^2=\sigma_z^2=1$
Orthogonal vectors are antisymmetric in the geometric product.
$\sigma_x \sigma_y+\sigma_y \sigma_x=\sigma_x \sigma_z+\sigma_z \sigma_x=\sigma_y \sigma_z+\sigma_z \sigma_y=0$
The product of two vectors is a mixture of a scalar and a bivector.
$(\alpha_x\sigma_x+\alpha_y\sigma_y+\alpha_z\sigma_z)(\beta_x\sigma_x+\beta_y\sigma_y+\beta_z\sigma_z)=$ $
(\alpha_x\beta_x+\alpha_y\beta_y+\alpha_z\beta_z)+(\alpha_y\beta_z-\alpha_z\beta_y)\sigma_{yz}+(\alpha_x\beta_z-\alpha_z\beta_x)\sigma_{xz}+(\alpha_x\beta_y-\alpha_y\beta_x)\sigma_{xy}$
The scalar part turns out to be the dot product of the vectors. The bivector part is the wedge product of the vectors. In 3D only, we can turn this bivector into a vector by taking the dual (multiply by the constant $\sigma_{xyz}$), which gives us the vector cross product of the vectors. The dot and cross products from vector algebra are combined into a single unified product.
The trace of the matrix representative of any multivector pulls out just the scalar and trivector parts. All the representatives of the vector and bivector components (see above) have zero trace. For a product of just two vectors, the trivector part is zero. So the trace of the matrix product of two vectors is the scalar part of their geometric product, which is the dot product.
There are many introductions to Geometric Algebra (e.g. Hestenes page 27-29) that discuss the relationship with the Pauli matrices. For more in-depth details on this approach to QM, see "Spacetime algebra and electron physics" by Doran, Lasenby, Gull, Somaroo, and Challinor.
https://arxiv.org/abs/quant-ph/0509178
