Learn Before
Formula

Complex Vector Representation from Paired Real Vector Elements

A real-valued vector x\mathbf{x} of dimension dd, represented by the sequence (x1,x2,,xd)(x_1, x_2, \dots, x_d), can be reinterpreted as a complex-valued vector x\mathbf{x}' of dimension d/2d/2. This is accomplished by pairing adjacent elements of x\mathbf{x} to form the real and imaginary parts of new complex numbers. The resulting vector x\mathbf{x}' is a sequence of these complex numbers, (x1,x2,,xd/2)(x'_1, x'_2, \dots, x'_{d/2}), where each element is defined as xj=x2j1+ix2jx'_{j} = x_{2j-1} + \mathbf{i}x_{2j}. The full transformation is expressed as:

x=x1x2xd/2=(x1+ix2) (x3+ix4)  (xd1+ixd)\mathbf{x}' = x'_{1} x'_{2} \dots x'_{d/2} = (x_1 + \mathbf{i}x_2) \ (x_3 + \mathbf{i}x_4) \ \dots \ (x_{d-1} + \mathbf{i}x_d)

This representation is a key step in applying rotational transformations to vectors, for example in Rotary Positional Embeddings (RoPE).

Image 0

0

1

Updated 2025-10-08

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences