Let $x_1,x_2, \cdots,x_n$ and $y_1,y_2, \cdots ,y_n$ be arbitrary real numbers satisfying $x_1^2+x_2^2+\cdots+x_n^2=y_1^2+y_2^2+\cdots+y_n^2=1$. Prove that
\[(x_1y_2-x_2y_1)^2 \le 2\left|1-\sum_{k=1}^n x_ky_k\right|\]
and find all cases of equality.
1. **Given Conditions and Objective**:
   We are given that \( x_1, x_2, \ldots, x_n \) and \( y_1, y_2, \ldots, y_n \) are real numbers such that:
   \[
   x_1^2 + x_2^2 + \cdots + x_n^2 = 1 \quad \text{and} \quad y_1^2 + y_2^2 + \cdots + y_n^2 = 1
   \]
   We need to prove that:
   \[
   (x_1y_2 - x_2y_1)^2 \leq 2 \left| 1 - \sum_{k=1}^n x_k y_k \right|
   \]
   and find all cases of equality.

2. **Applying Lagrange's Identity**:
   By Lagrange's identity, we have:
   \[
   \left( \sum_{i=1}^n x_i^2 \right) \left( \sum_{i=1}^n y_i^2 \right) - \left( \sum_{i=1}^n x_i y_i \right)^2 = \sum_{1 \leq i < j \leq n} (x_i y_j - x_j y_i)^2
   \]
   Given \( \sum_{i=1}^n x_i^2 = 1 \) and \( \sum_{i=1}^n y_i^2 = 1 \), this simplifies to:
   \[
   1 - \left( \sum_{i=1}^n x_i y_i \right)^2 = \sum_{1 \leq i < j \leq n} (x_i y_j - x_j y_i)^2
   \]

3. **Bounding the Expression**:
   Since \( \sum_{1 \leq i < j \leq n} (x_i y_j - x_j y_i)^2 \geq (x_1 y_2 - x_2 y_1)^2 \), we have:
   \[
   1 - \left( \sum_{i=1}^n x_i y_i \right)^2 \geq (x_1 y_2 - x_2 y_1)^2
   \]

4. **Simplifying the Inequality**:
   Let \( c = \sum_{i=1}^n x_i y_i \). Then:
   \[
   1 - c^2 \geq (x_1 y_2 - x_2 y_1)^2
   \]
   Since \( -1 \leq c \leq 1 \), we can write:
   \[
   1 - c^2 = (1 - c)(1 + c)
   \]
   Therefore:
   \[
   (x_1 y_2 - x_2 y_1)^2 \leq (1 - c)(1 + c)
   \]

5. **Using the Absolute Value**:
   Notice that:
   \[
   (1 - c)(1 + c) = 1 - c^2 \leq 2 \left| 1 - c \right|
   \]
   because \( 1 - c^2 \leq 2 \) and \( \left| 1 - c \right| \leq 2 \).

6. **Conclusion**:
   Combining the above results, we get:
   \[
   (x_1 y_2 - x_2 y_1)^2 \leq 2 \left| 1 - \sum_{k=1}^n x_k y_k \right|
   \]

7. **Equality Condition**:
   Equality holds if and only if:
   \[
   \sum_{1 \leq i < j \leq n} (x_i y_j - x_j y_i)^2 = (x_1 y_2 - x_2 y_1)^2
   \]
   This implies that all other terms in the sum must be zero, which happens if and only if:
   \[
   \frac{x_i}{y_i} = \frac{x_j}{y_j} \quad \text{for all} \quad i \neq j
   \]
   This means that \( \mathbf{x} \) and \( \mathbf{y} \) are linearly dependent.

The final answer is \( \boxed{ (x_1 y_2 - x_2 y_1)^2 \leq 2 \left| 1 - \sum_{k=1}^n x_k y_k \right| } \)