Skip to content
Science, DecodedContext Jamming

Rosetta Stone · 21 of 30

∈\in

Element of (set membership)

Notation: structural shorthand

In plain English

"Is a member of." x∈Rdx \in \mathbb{R}^d reads "x is a list of d real numbers". It works like a type annotation: it tells you what kind of object a symbol is before you see any formula using it. ∉\notin means "is not a member of"; ⊂\subset means "is a subset of".

As code

// x ∈ ℝ^768  ≈  a type declaration
/** @type {Float32Array} length 768 */
const x = new Float32Array(768);
new Set(['A', 'C', 'G', 'T']).has('G');  // 'G' ∈ {A, C, G, T}

See it

x∈Sx \in S means “x is one of the members of S.” Highlighted dots are members of S = the even-numbered dots.

What it means, field by field

Mathematics

Set membership; ℝ (reals), ℤ (integers), ℕ (naturals) are the common sets.

AI / ML

Shapes and types: W ∈ ℝ^{d×k} declares a d-by-k weight matrix; tokens ∈ vocabulary V.

Biology

Sequence alphabets: each base ∈ {A, C, G, T}; each residue ∈ the 20 amino acids.

Physics

State spaces: positions ∈ ℝ³, states ∈ a Hilbert space.

In a research paper

Shape declarations for attention (Vaswani et al. 2017, "Attention Is All You Need").
Q,K∈Rn×dk,V∈Rn×dvQ, K \in \mathbb{R}^{n \times d_k},\quad V \in \mathbb{R}^{n \times d_v}

Queries and keys are n rows of d_k numbers each; values are n rows of d_v numbers.

Common misreadings

  • Confusing ∈ with ε (epsilon, a small quantity). They look alike in some fonts.

  • Skipping the ∈ declarations. They are often the quickest way to understand a paper’s equations.

Connected symbols

Where it appears on this site