QR Iteration convergence Assuming $\mathbf x_1$ and $\mathbf x_2$ are eigenvectors of matrix $\mathbf A \in \mathbb{R}^{2\times 2}$, there is $$\left(\mathbf I-\mathbf x_1\mathbf x_1^\top\right)\mathbf A\left(\mathbf I-\mathbf x_1\mathbf x_1^\top\right)\mathbf x_2 = \lambda_2 \left(\mathbf I-\mathbf x_1\mathbf x_1^\top\right)\mathbf x_2.$$
(Darve "Numerical linear algebra with Julia 2021", pp 159)
Why is $\left(\mathbf I-\mathbf x_1\mathbf x_1^\top\right)\mathbf A = \lambda_2? $

We assume A is a symmetric matrix in your problem.
If $\lambda_1$ and $\lambda_2$ are distinct, then their eigenvectors are orthogonal. Otherwise if the you would need to choose $x_1,x_2$ to be orthogonal.
so $x_1^T x_2 =0$.
Also $Ax_2 = \lambda_2 x_2$, assuming $\lambda_i$ is the eigenvalue of the corresponding eigenvector $x_i$
