A Complete Mathematical Introduction

String Theory,
Dualities &
M-Theory

From one-dimensional vibrating strings to an 11-dimensional unified theory — the mathematics, physics, and profound dualities that connect five universes into one.

▼   enter the quantum foam   ▼

Section 01 — The Foundation

String Theory: From Points to Strings

The central idea of string theory is radical but simple: the fundamental constituents of nature are not point particles (0-dimensional) but one-dimensional vibrating strings. Different vibrational modes of the same string correspond to different particles — the electron, the quark, the photon, and even the graviton are all different harmonics of the same string.

Why Strings?

Point-particle quantum field theory suffers from ultraviolet (UV) divergences — integrals over loop momenta blow up at short distances. Feynman diagrams contain vertices where multiple lines meet at a single point, giving infinite contributions. Strings naturally regulate these divergences: string interactions smear out over the length of the string, replacing sharp vertices with smooth worldsheets, eliminating the UV catastrophe entirely.

The string length: α = ℓs² where ℓs ~ 10−34 m (near the Planck length). The parameter α′ (pronounced "alpha prime") is the Regge slope, with dimensions of length², and sets the scale at which strings differ from particles.

Open and Closed Strings

Open strings have two free endpoints. Their boundary conditions constrain the endpoints to move at the speed of light (Neumann BC) or to be fixed to a D-brane (Dirichlet BC).

Closed strings form loops with no endpoints. Crucially, every closed string theory contains a spin-2 massless state — the graviton. String theory is automatically a theory of quantum gravity.

n = 1
Mode n=1: fundamental oscillation

The Nambu–Goto Action

A point particle traces a worldline in spacetime; its action is proportional to the proper length of that worldline. A string sweeps out a two-dimensional worldsheet Σ with coordinates (τ, σ). The action is proportional to the worldsheet area:

SNG = − T ∫∫ d²σ √−det(hαβ)

where T = 1/(2πα′) is the string tension (energy per unit length), and hαβ = ημναXμβXν is the induced metric on the worldsheet — the metric pulled back from the target spacetime. The coordinates Xμ(τ,σ) describe where the string sits in the D-dimensional spacetime.

The Polyakov Action — Conformal Symmetry

The Nambu-Goto action is the "right" one physically but is hard to quantize (it has a square root). The Polyakov action introduces an intrinsic worldsheet metric γαβ:

SP = − T/2 ∫∫ d²σ √−γ · γαβαXμβXμ

The equations of motion for γαβ set it equal to the induced metric, recovering Nambu-Goto. The Polyakov action is classically equivalent but is quadratic in Xμ — much easier to quantize. Its symmetries are reparameterization invariance (diffeomorphisms) and Weyl invariance (local rescaling γαβ → eγαβ). These symmetries together allow us to choose the conformal gauge γαβ = ηαβ, reducing the action to D free bosons.

Equations of Motion and Mode Expansion

In conformal gauge, the equations of motion are the 2D wave equation:

( ∂τ² − ∂σ² ) Xμ(τ,σ) = 0

This is solved by left-movers and right-movers: Xμ = XμL(τ+σ) + XμR(τ−σ). For a closed string (with periodicity Xμ(τ,σ+2π) = Xμ(τ,σ)):

Xμ(τ,σ) = xμ + 2α′pμτ + i√(α′/2) Σn≠0 (ᾱμn/n) e−2in(τ+σ) + i√(α′/2) Σn≠0μn/n) e−2in(τ−σ)

For an open string (Neumann BC: ∂σXμ|σ=0,π = 0):

Xμ(τ,σ) = xμ + 2α′pμτ + i√(2α′) Σn≠0μn/n) e−inτ cos(nσ)

The oscillator modes αμn (with n > 0) will become the creation and annihilation operators upon quantization.

τ = 0
Worldsheet swept by the string as it propagates through spacetime

Section 02 — Quantization

The Mass Spectrum & Critical Dimension

Quantizing the string means promoting the mode coefficients αμn to operators satisfying the commutation relations:

μm, ανn] = m · δm+n,0 ημν

These are exactly the harmonic oscillator algebra (for each m and μ), with αμ−n (n > 0) acting as creation operators and αμn as annihilation operators. Physical states are built by acting on the vacuum |0, p⟩ with creation operators.

The Virasoro Algebra

The constraints from the Polyakov action (the worldsheet stress-energy tensor vanishes: Tαβ = 0) generate the Virasoro algebra:

Ln = (1/2) Σm∈ℤ αμn−m αμ,m
[Lm, Ln] = (m−n) Lm+n + (c/12) m(m²−1) δm+n,0

The central charge c appears upon normal-ordering and equals c = D (the spacetime dimension) for bosonic strings. Each worldsheet boson contributes c = 1. The constraint Tαβ = 0 imposes Ln|phys⟩ = 0 for n > 0 and (L0 − a)|phys⟩ = 0 where a is the normal-ordering constant.

The Mass Formula

From L0|phys⟩ = a|phys⟩, the mass-squared of a physical state is:

α′M² = N − a

where N = Σn≥1 αμ−nαμ,n is the level number (total excitation) and a is the normal-ordering constant. For bosonic strings a = 1, for superstrings a = 0 (NS sector) or a = 1/2 (R sector).

Level Spectrum

Level Nα′M²States (bosonic)Spin
N=0−1 (tachyon!)|0,p⟩0
N=10 (massless)αμ−1|0,p⟩1 (photon) or 2 (graviton)
N=2+1 (massive)αμ−1αν−1|0,p⟩, αμ−2|0,p⟩0,1,2
N=3+2 (massive)...0,1,2,3
The tachyon problem: The N=0 state has M² < 0 — an imaginary mass, signaling an instability of the vacuum. Bosonic string theory is inconsistent. The solution is supersymmetry: superstring theories remove the tachyon completely.
α′=0.5
Mass spectrum: each level is a tower of particles

The Critical Dimension — Why D = 26 (Bosonic) or D = 10 (Super)

The Weyl anomaly (conformal anomaly) must vanish for a consistent quantum theory. The total central charge of the worldsheet CFT must be:

ctotal = cmatter + cghosts = 0

The reparametrization ghosts (bc ghost system) contribute cghosts = −26. Each spacetime boson Xμ contributes c = 1. Therefore:

D · 1 − 26 = 0  ⟹  D = 26  (bosonic strings)

For superstrings, each worldsheet fermion ψμ contributes c = 1/2. With D bosons and D fermions, plus superghosts contributing −10:

D + D/2 − 26 − 10/2 = 0  ⟹  D = 10  (superstrings)
Level-matching: For closed strings, left-movers and right-movers must satisfy L0 = L̄0, i.e., NL = NR (the excitation numbers must be equal). This is the origin of many selection rules in string theory.

Section 03 — Supersymmetry on the Worldsheet

The Five Superstring Theories

Adding worldsheet supersymmetry — pairing each bosonic field Xμ with a Majorana-Weyl fermion ψμ — removes the tachyon and reduces the critical dimension to D = 10. There are exactly five consistent superstring theories, related by dualities.

The Super Polyakov / Green-Schwarz Action

The Ramond-Neveu-Schwarz (RNS) worldsheet action is:

SRNS = − T/2 ∫ d²σ (∂αXμαXμ − iψ̄μρααψμ)

The fermions ψμ can be periodic (Ramond sector, R) or antiperiodic (Neveu-Schwarz sector, NS) around the closed string. Physical states come from the GSO projection (Gliozzi–Scherk–Olive) which eliminates the tachyon and gives a spacetime supersymmetric spectrum.

Mass: α′M² = NB + NF − a

where a = 0 for the R sector and a = 1/2 for the NS sector (after GSO projection).

The Five Theories

Type I

Type I Superstring Theory

Open + closed unoriented strings in D = 10. Has N=1 spacetime supersymmetry (one supercharge). The gauge group is SO(32) — fixed by requiring cancellation of anomalies (Green-Schwarz mechanism).

  • Worldsheet: unoriented (Ω: worldsheet parity σ → π − σ)
  • Open strings carry Chan-Paton factors → gauge fields
  • Gauge group: SO(32)
  • Closed string sector: supergravity + dilaton + antisymmetric tensor
  • D9-branes fill all of space
S-dual to Heterotic SO(32)

Massless Spectrum

FieldSectorSpin
Graviton gμνClosed NS-NS2
Dilaton ΦClosed NS-NS0
Gauge boson AμOpen NS1
Gravitino ΨμClosed R3/2
Gaugino λOpen R1/2
Type IIA

Type IIA Superstring Theory

Closed, oriented strings with N=2 supersymmetry whose two supercharges have opposite chirality. Non-chiral in 10D. Contains both even-dimensional Ramond-Ramond gauge fields.

  • Left-movers: NSL, RL sector
  • Right-movers: NSR, RR sector (opposite chirality)
  • RR fields: C1 (1-form), C3 (3-form)
  • D-branes: D0, D2, D4, D6, D8 (even-dimensional)
  • Low-energy limit: Type IIA supergravity
M-Theory connection: Type IIA at strong coupling gs→∞ grows a new circular dimension of radius R11 = gs2/3s, revealing 11-dimensional M-Theory.

Massless NS-NS + RR Fields

FieldTypeSource
gμν, Φ, BμνNS-NSGraviton, dilaton, B-field
CμRR 1-formD0-brane charge
CμνρRR 3-formD2-brane charge
ψμ, λR sectorsGravitinos (opposite chirality)
Type IIB

Type IIB Superstring Theory

Closed, oriented strings with N=2 supersymmetry whose two supercharges have same chirality. Chiral in 10D. Contains odd-dimensional RR gauge fields. The worldsheet theory has a remarkable SL(2,ℤ) self-duality.

  • Both left and right-movers: same chirality
  • RR fields: C0, C2, C4+ (self-dual)
  • D-branes: D1, D3, D5, D7, D9
  • SL(2,ℤ) S-duality: τ → (aτ+b)/(cτ+d)
  • Crucial for AdS/CFT: AdS5×S5 arises from D3-brane stacks
τ = C0 + i/gs → (aτ+b)/(cτ+d) , ad−bc=1

The Axio-Dilaton τ

Under S-duality (τ→−1/τ): gs→1/gs, B2↔C2, F1-strings↔D1-branes. The full SL(2,ℤ) generates (p,q) strings — bound states of p fundamental strings and q D1-branes.

F-Theory: The SL(2,ℤ) acting on τ = τ1 + iτ2 is the modular group of a 2-torus. F-Theory treats τ as the complex structure of a geometric torus, lifting IIB to a 12-dimensional theory.
Heterotic SO(32)

Heterotic SO(32) Theory

The Heterotic string is a hybrid: left-movers (τ+σ) are the 10D superstring, while right-movers (τ−σ) are the 26D bosonic string. The mismatch of 16 dimensions is filled by an internal lattice Γ16 compactified on a torus.

For consistency (modular invariance), Γ16 must be an even, self-dual lattice. There are exactly two such 16-dimensional lattices:

  • ΓSO(32) = D16⁺ lattice → gauge group SO(32)
  • ΓE₈×E₈ = E8 × E8 lattice
N = 1 SUSY, gauge group SO(32), NL = Ñ + pL²/2 − 1

Why Left-Right Asymmetry Works

The worldsheet action separates into left and right sectors. Anomaly cancellation (the Green-Schwarz mechanism) requires:

I10 = Igrav + Igauge + Imixed = 0

This works only for SO(32) or E8×E8 in D=10 — a miraculous cancellation that was the original evidence string theory could give realistic gauge theories. The gauge bosons arise from string states at level N = 1 whose internal momenta lie on the root lattice of SO(32).

Heterotic E₈×E₈

Heterotic E₈ × E₈ Theory

The most phenomenologically promising theory for decades. The gauge group E8×E8 is the largest exceptional Lie group, with rank 16. Compactifying on a Calabi-Yau 3-fold breaks E8×E8 to E6×E8 or similar groups containing the Standard Model gauge group SU(3)×SU(2)×U(1).

The two E8 factors correspond to two "walls" of the 11D M-theory interval (Hořava-Witten M-theory). Visible matter lives on one wall, the "hidden sector" on the other.

dim(E8) = 248,   rank(E8) = 8

E₈ Root System

The E8 lattice is the unique even, self-dual 8-dimensional lattice. Its 240 roots form the massless gauge bosons. The roots are vectors in ℝ8 of the form:

±ei ± ej (i≠j) : 112 roots
(1/2)(±e1±...±e8), even # of minus signs : 128 roots

The E8 lattice appears also in: the Leech lattice (sphere packing), modular forms, and the Monster group — connecting string theory to deep number theory.


Section 04 — Hidden Dimensions

Compactification & Extra Dimensions

String theory requires 10 (or 11) spacetime dimensions, but we observe only 4. The extra dimensions must be compact — curled up at a scale too small to observe directly (~ ℓs ~ 10−34 m). The geometry of the compactification determines the low-energy 4D physics: particle content, gauge group, couplings, masses.

Kaluza-Klein Compactification

The original idea (Kaluza 1919, Klein 1926): compactify one dimension on a circle S1 of radius R. A field expanded around the circle:

φ(x,y) = Σn φn(x) einy/R

has momentum in the y-direction quantized as py = n/R. The 4D mass of the n-th Kaluza-Klein (KK) mode is Mn² = m0² + n²/R². At energies much less than 1/R, only the n=0 mode is accessible and the extra dimension is invisible.

Calabi-Yau Manifolds

For a realistic string compactification preserving N=1 supersymmetry in 4D, the 6 extra dimensions must form a Calabi-Yau 3-fold — a complex 3-dimensional Kähler manifold with vanishing first Chern class (SU(3) holonomy). This ensures one covariantly constant spinor, giving the required supersymmetry.

Key properties of a Calabi-Yau 3-fold X:

  • Kähler manifold: metric gij̄ = ∂iK (Kähler potential K)
  • Ricci flat: Rij̄ = 0 (satisfies vacuum Einstein equations)
  • Holonomy group SU(3) ⊂ SO(6)
  • Characterized by Hodge numbers h1,1 and h2,1
χ(X) = 2(h1,1 − h2,1)   (Euler characteristic)

The number of generations of quarks and leptons is |χ|/2 in the simplest models. Getting |χ| = 6 gives 3 generations (our universe!).

h¹¹=3 h²¹=6
Calabi-Yau projection — Hodge diamond visualization

The Hodge Diamond

The topology of a Calabi-Yau 3-fold is characterized by its Hodge numbers hp,q (dimension of the space of harmonic (p,q)-forms). The Hodge diamond has a specific symmetry structure:

        1
     0     0
  0   h1,1   0
1   h2,1   h2,1   1
  0   h1,1   0
     0     0
        1

For compactification to give the Standard Model with 3 generations, phenomenologists search the string landscape for Calabi-Yau manifolds with the right Hodge numbers. The number of distinct Calabi-Yau 3-folds is estimated at ~500 million — giving rise to the "landscape" of ~10500 string vacua when fluxes are included.

Mirror symmetry: Any Calabi-Yau X has a mirror X̃ with h1,1(X) = h2,1(X̃) and vice versa. This exchanges the complex structure moduli with Kähler moduli — a profound mathematical duality discovered through string theory.

Section 05 — Target Space Duality

T-Duality: R ↔ α′/R

When strings propagate on a circle of radius R, something remarkable happens: the theory is exactly equivalent to strings on a circle of radius α′/R. This is T-duality, and it has no analog in point-particle physics. Strings have two distinct ways to "feel" a compact dimension: momentum modes and winding modes.

Momentum and Winding Modes

For a string on S1 of radius R, the X25 coordinate is periodic: X25 ~ X25 + 2πR. The string has:

Kaluza-Klein (momentum) modes: p25 = n/R (quantized momentum)

Winding modes: X25(σ+2π) = X25(σ) + 2πwR (the string wraps w times around the circle)

α′M² = n²R²/α′² + w²R²/α′ + 2(NL+NR−2)

Under T-duality R ↔ α′/R, the momentum and winding numbers swap: n ↔ w. The mass formula is invariant! More precisely, T-duality acts on the left- and right-moving zero modes:

pL = n/R + wR/α′  ↔  p̃L = n/R − wR/α′
pR = n/R − wR/α′  ↔  p̃R = −n/R + wR/α′
R=1.0
At R=√α′ (self-dual point): enhanced gauge symmetry!

The T-Duality Transformation

The transformation maps the theory at radius R to the theory at radius R̃ = α′/R. The dilaton also transforms: Φ̃ = Φ − log(R/√α′) to keep the string coupling invariant.

D-branes transform: A Dp-brane wrapped around the circle becomes a D(p−1)-brane in the T-dual theory, and vice versa. T-duality changes the dimension of D-branes: T(Dp) = D(p∓1) depending on whether the circle is along or transverse to the brane.

Self-dual radius R = √α′: At this special radius, the theory has enhanced gauge symmetry. Extra massless states appear from winding modes (n=w=±1), and the U(1) gauge symmetry is enhanced to SU(2) — the stringy realization of the Higgs mechanism in reverse.

Consequences for string theories: T-duality along one circle maps Type IIA ↔ Type IIB and Het SO(32) ↔ Het E₈×E₈. All five superstring theories are thus connected by T-duality.

IIA ←→T IIB     Het SO(32) ←→T Het E₈×E₈

Section 06 — Non-Perturbative Dualities

S-Duality, D-Branes & Non-Perturbative Physics

T-duality is a perturbative duality (valid at all values of the coupling). S-duality is non-perturbative: it maps the strong-coupling regime (gs ≫ 1) of one theory to the weak-coupling regime (gs ≪ 1) of another (or the same) theory, where gs = e⟨Φ⟩ is the string coupling set by the dilaton vev.

S-Duality

S-duality: gs ↔ 1/gs  (strong ↔ weak coupling)

S-duality pairs:

Type I ↔ Het SO(32)

At strong coupling, Type I becomes Heterotic SO(32). The D1-branes of Type I become the fundamental strings of Het SO(32), and vice versa.

Type IIB ↔ Type IIB

Type IIB is S-self-dual under τ→−1/τ, exchanging fundamental strings (F1) with D1-branes. More generally SL(2,ℤ) acts on the axio-dilaton τ.

Type IIA / Het E₈ → M-Theory

At strong coupling, Type IIA and Het E₈×E₈ become 11-dimensional M-Theory — not S-duality in the traditional sense but a limit to a new theory.

BPS States and the Bogomolny Bound

S-duality can be checked because BPS states (Bogomolny-Prasad-Sommerfield) are protected: their mass is exactly determined by their charges, independent of coupling. The BPS bound says the mass of a state with charges (qe, qm) satisfies:

M ≥ |Z| = |qe + τ qm| / √Im(τ)

States saturating this bound are stable under quantum corrections — their mass cannot change as we vary gs. This means we can track D-branes from weak to strong coupling. S-duality predicts the existence of magnetic monopoles (D-branes) in the dual theory.

D-Branes — Where Open Strings End

A Dp-brane is a (p+1)-dimensional hypersurface in spacetime on which open strings can end. The "D" stands for Dirichlet boundary conditions: the string endpoints are fixed to the brane's worldvolume.

Key insight (Polchinski 1995): D-branes are dynamical objects, not just boundary conditions. They carry Ramond-Ramond charges and tension, and are the source of RR gauge fields. D-branes are the non-perturbative states that make S-duality work.

D-Brane Properties

Tension: Tp = 1/((2π)p α′(p+1)/2 gs)

Note the 1/gs dependence — D-branes are non-perturbative objects (infinitely heavy at weak coupling).

Worldvolume theory: Open strings on N coincident Dp-branes give a U(N) gauge theory in (p+1) dimensions — the DBI action at low energy:

SDBI = −Tp ∫ dp+1σ e−Φ √−det(Gab+Bab+2πα′Fab)

D-brane charges: A Dp-brane couples to the RR (p+1)-form potential Cp+1 via a Wess-Zumino term:

SWZ = μpΣp+1 Cp+1
N=2
Open strings stretch between D-branes giving a U(N) gauge theory

The Web of Dualities

Combining T-duality and S-duality, all five superstring theories are connected:

The five superstring theories and M-Theory — connected by dualities

Section 07 — The 11th Dimension

M-Theory: The Master Theory

In 1995, Edward Witten shocked the physics world by arguing that all five superstring theories — plus 11-dimensional supergravity — are limits of a single, unique 11-dimensional theory he called M-Theory. The "M" stands for mystery, magic, membrane, or mother, depending on who you ask. M-Theory is not yet fully formulated, but its web of dualities, low-energy limit, and solitonic objects (M2 and M5 branes) are well understood.

"String theory is a part of twenty-first century physics that fell by chance into the twentieth century." — Edward Witten

The Emergence of the 11th Dimension

Type IIA superstring theory at strong coupling gs → ∞ reveals a new circular dimension of radius R11. This can be seen from the Type IIA D0-brane mass:

MD0 = 1/(gss) = 1/ℓ11

where ℓ11 = gs1/3s is the 11D Planck length. At strong coupling, a tower of D0-brane bound states becomes light (Mn = n/R11) — exactly the Kaluza-Klein tower of an 11th dimension of radius R11 = gss.

R11 = gs2/3P,11  ,  ℓP,11 = gs1/3s

11-Dimensional Supergravity

The low-energy limit of M-Theory is 11-dimensional supergravity, first constructed by Cremmer, Julia, and Scherk in 1978. Its field content is:

  • Metric gMN : 44 bosonic degrees of freedom
  • 3-form potential CMNP : 84 bosonic d.o.f.
  • Gravitino ΨMA : 128 fermionic d.o.f.
128 = 44 + 84   (bosons = fermions ✓ SUSY)

The 11D supergravity action is uniquely determined:

S11 = 1/(2κ11²) ∫ d11x √−g [R − |G4|²/2] − 1/(6κ11²) ∫ C3∧G4∧G4

where G4 = dC3 is the 4-form field strength. The last term is a Chern-Simons coupling unique to 11D SUGRA.

M-Branes

M-Theory has two types of extended objects (no fundamental strings!):

M2-brane (membrane): A 2+1 dimensional extended object. The fundamental M-Theory object. When compactified on a circle S1, the M2 wrapped around S1 becomes the Type IIA fundamental string F1. The M2 transverse to S1 becomes the D2-brane.

Tension: TM2 = 1/((2π)² ℓ11³)
M5-brane: A 5+1 dimensional extended object. When wrapped on S1, gives the D4-brane of Type IIA. When transverse, gives the NS5-brane.

Tension: TM5 = 1/((2π)⁵ ℓ11⁶) = TM2²/(2π)

The M5 worldvolume hosts a remarkable 6D (2,0) superconformal field theory with no known Lagrangian.

The Complete M-Theory Web

M-Theory unifies all five superstring theories and 11D SUGRA

The Hořava-Witten Boundary

Heterotic E₈×E₈ arises from M-Theory on an interval S1/ℤ2 (a circle with two points identified, giving a line segment). The two ends of the interval are 10D boundaries, each carrying an E8 gauge multiplet. This is the Hořava-Witten construction (1996), giving a compelling geometric picture of why there are two E8 factors.

M-Theory on S1/ℤ2  →  Het E8×E8 (R11→0)

Section 08 — Holographic Duality

AdS/CFT — The Holographic Correspondence

The Anti-de Sitter / Conformal Field Theory correspondence, proposed by Juan Maldacena in 1997, is the most successful and tested example of a duality in string theory. It states that a quantum gravity theory in a bulk space is exactly equivalent to a conformal field theory on its boundary, with no gravitational degrees of freedom. This is the most concrete realization of the holographic principle.

"The boundary theory encodes all the information of the bulk — gravity in (d+1) dimensions is dual to a quantum field theory in d dimensions, without gravity." — Maldacena Conjecture, 1997

The Original Duality: AdS₅/CFT₄

Consider N coincident D3-branes in flat 10D space. There are two equivalent descriptions:

Open string perspective: The low-energy worldvolume theory of N D3-branes is N=4 Super Yang-Mills in 4D with gauge group SU(N) and coupling gYM² = 4πgs. This is a CFT (it has vanishing β-function to all orders).
Closed string perspective: In the near-horizon limit r→0, the geometry becomes AdS5×S5 — the product of 5D Anti-de Sitter space with a 5-sphere. The Type IIB string theory lives in this background.

The duality states these are the same physical theory viewed differently:

Type IIB on AdS5×S5   =   N=4 SYM in 4D

The dictionary between the two sides:

Bulk (Gravity Side)Boundary (CFT Side)
AdS radius L = (4πgsN)^{1/4} ℓs't Hooft coupling λ = gYM²N
String coupling gs1/N expansion
Bulk field φ of mass mCFT operator O of dimension Δ
Δ(Δ−4) = m²L² (relation)Δ = 2 + √(4+m²L²)
φ0(x) = boundary value of φSource J(x) for operator O
Zstring0]⟨e∫J·OCFT
Black hole in AdSThermal CFT state, finite temperature

The Parameters

The AdS₅ metric in Poincaré coordinates:

ds² = (L/z)² (dz² + dxμdxμ)

where z ∈ (0,∞) is the radial (holographic) coordinate. The boundary is at z=0, the interior (bulk) at z>0. The isometries of AdS5 form the group SO(2,4), which is also the conformal group in 4D — this is not a coincidence.

The limit in which AdS/CFT is tractable:

Large N: gs→0, λ = gsN fixed → strings → classical gravity
Large λ: λ→∞ → supergravity limit (string corrections α′/L² ~ λ−1/2→0)
N=4 z=0.3
Bulk AdS geometry ↔ boundary CFT — holography in action

Applications and Evidence

🔥

Quark-Gluon Plasma

The shear viscosity-to-entropy ratio η/s of the strongly coupled QGP at RHIC matches the AdS/CFT prediction η/s = ℏ/4πkB — the KSS bound.

📐

Entanglement Entropy

Ryu-Takayanagi formula: entanglement entropy of region A in the CFT = area of minimal geodesic surface in AdS bulk: SA = Area(γA)/4GN.

🌡

Condensed Matter

Holographic superconductors, strange metals, and non-Fermi liquids — AdS/CFT gives a tractable framework for strongly-coupled quantum many-body systems.


Section 09 — Computational Examples

GNU Octave Code Examples

Ten complete, runnable Octave scripts illustrating the mathematics of string theory, dualities, and M-theory.

1. String Mode Expansion and Oscillation

Visualize the mode expansion Xμ(τ,σ) for open and closed strings, showing the fundamental and overtone harmonics.

% ── String Mode Expansion: X^μ(τ,σ) ─────────────────────────────────────
% Open string: X(τ,σ) = x + 2α'pτ + i√(2α') Σ_{n≠0} (α_n/n)e^{-inτ}cos(nσ)
% Closed string: X(τ,σ) = x + 2α'pτ + i√(α'/2) Σ [left + right movers]

alpha_prime = 1;   % set α′ = 1
n_modes = 6;       % number of modes to include
sigma = linspace(0, pi, 200);  % worldsheet coordinate σ ∈ [0,π] (open)
tau_vals = linspace(0, 2*pi, 8);  % several time slices

% ── Open string mode functions ────────────────────────────────────────────
% Zero mode: x^μ + 2α'p^μ τ (center of mass)
% Oscillators: α_n create/destroy excitations

% Example: excite mode n=1 and n=3 (arbitrary amplitudes)
alpha_n = zeros(1, n_modes);
alpha_n(1) = 1.0;   % n=1 amplitude
alpha_n(3) = 0.5;   % n=3 amplitude

figure('Name', 'String Mode Expansion');
subplot(2,2,1);
% Plot individual modes cos(nσ) for n=1..4
cols = {'b','r','g','m'};
for n = 1:4
  f_n = cos(n * sigma);
  plot(sigma/pi, f_n, [cols{n} '-'], 'LineWidth', 1.8); hold on;
end
xlabel('\sigma/\pi'); ylabel('cos(n\sigma)'); grid on;
legend({'n=1','n=2','n=3','n=4'}, 'Location', 'NE');
title('Open string mode functions');

subplot(2,2,2);
% Superpose modes for multiple time slices
for k = 1:length(tau_vals)
  tau = tau_vals(k);
  X_tau = zeros(1, length(sigma));
  X_tau = 0.5 * tau;   % zero mode drift
  for n = 1:n_modes
    X_tau = X_tau + sqrt(2*alpha_prime) * real(alpha_n(n) * exp(-1i*n*tau)) * cos(n*sigma) / n;
  end
  plot(sigma/pi, X_tau - 0.5*tau, 'LineWidth', 1.5); hold on;
end
xlabel('\sigma/\pi'); ylabel('X(	au,\sigma) - zero mode'); grid on;
title(sprintf('Open string: %d time slices, modes n=1+3', length(tau_vals)));

subplot(2,2,3);
% Closed string: left + right movers independently
sigma_c = linspace(0, 2*pi, 300);  % σ ∈ [0,2π]
alpha_L = [1.0, 0, 0.4, 0];   % left-mover amplitudes
alpha_R = [0.6, 0, 0, 0.3];   % right-mover amplitudes (N_L=N_R by level-matching)
tau0 = 1.0;
X_closed = zeros(1, length(sigma_c));
for n = 1:4
  XL = sqrt(alpha_prime/2) * real(alpha_L(n)*exp(-2i*n*(tau0+sigma_c)/n));
  XR = sqrt(alpha_prime/2) * real(alpha_R(n)*exp(-2i*n*(tau0-sigma_c)/n));
  X_closed = X_closed + XL + XR;
end
plot(sigma_c/(2*pi), X_closed, 'b-', 'LineWidth', 2); grid on;
xlabel('\sigma/(2\pi)'); title('Closed string: left+right movers');
yline(0, 'k--'); ylabel('X(	au,\sigma)');

subplot(2,2,4);
% Worldsheet: plot X(τ,σ) as a surface
[TAU, SIG] = meshgrid(linspace(0,4,50), linspace(0,pi,50));
X_WS = 0.3*TAU + zeros(size(TAU));
for n = 1:3
  X_WS = X_WS + sqrt(2*alpha_prime)*real(alpha_n(n)*exp(-1i*n*TAU)).*cos(n*SIG)/n;
end
surf(TAU, SIG/pi, X_WS, 'EdgeColor', 'none', 'FaceAlpha', 0.85);
colormap(cool); xlabel('	au'); ylabel('\sigma/\pi'); zlabel('X(	au,\sigma)');
title('Worldsheet: string position over time'); view(35,30);

sgtitle('String Theory: Mode Expansion of X^\mu(\tau,\sigma)');

2. String Mass Spectrum and Regge Trajectories

% ── String Mass Spectrum: α′M² = N − a ────────────────────────────────────
% At each level N, the states form representations of the transverse SO(D−2)
% The highest-spin state at level N has spin J = N (Regge trajectory)
% Regge trajectory: α′M² = J − a  or  J = α′M² + a

alpha_prime = 0.5;   % Regge slope (GeV^-2 for QCD strings)
D = 10;              % critical dimension (superstring)
a_SUSY = 0;          % GSO projected: a=0 for massless graviton at N=1
a_Bos  = 1;          % bosonic string: tachyon at N=0

N_max = 8;
M2_bos  = ((1:N_max) - a_Bos)  / alpha_prime;
M2_susy = ((1:N_max) - a_SUSY) / alpha_prime;
J_bos   = (0:N_max-1) + a_Bos;   % spins at each level
J_susy  = (0:N_max-1) + a_SUSY;

% ── Count states at each level ────────────────────────────────────────────
% For D-2 transverse bosons: use partition function p(N)
% p(N) = number of partitions of N (Hardy-Ramanujan formula for large N)
p_N = zeros(1, N_max+1);
p_N(1) = 1;  % p(0) = 1
for n = 1:N_max
  % Use recursion via pentagonal numbers
  for k = 1:n
    sign_k = (-1)^(k+1);
    g1 = k*(3*k-1)/2;
    g2 = k*(3*k+1)/2;
    if g1 <= n, p_N(n+1) += sign_k * p_N(n-g1+1); end
    if g2 <= n, p_N(n+1) += sign_k * p_N(n-g2+1); end
  end
end
% For D-2=8 transverse dimensions: total states ~ p(N)^8
states_8 = p_N(1:N_max).^8;

figure('Name', 'String Mass Spectrum');
subplot(1,2,1);
% Regge trajectories
M2_cont = linspace(-2,16,200);
J_regge_bos  = alpha_prime * M2_cont + a_Bos;
J_regge_susy = alpha_prime * M2_cont + a_SUSY;
plot(M2_cont, J_regge_bos, 'b-', 'LineWidth', 1.5); hold on;
plot(M2_cont, J_regge_susy, 'r-', 'LineWidth', 1.5);
% Mark actual states
for n = 1:N_max
  plot(M2_bos(n),  J_bos(n),  'bo', 'MarkerSize', 6, 'MarkerFaceColor', 'b');
  plot(M2_susy(n), J_susy(n), 'rs', 'MarkerSize', 6, 'MarkerFaceColor', 'r');
end
xline(0, 'k--'); yline(0, 'k--');
grid on; xlabel('lpha''M^2'); ylabel('Spin J');
legend({'Bosonic trajectory','Superstring trajectory'}, 'Location', 'NW');
title('Regge Trajectories: J = lpha''M^2 + a');
text(-0.7*a_Bos/alpha_prime, 0.2, 'Tachyon', 'Color', 'blue', 'FontSize', 8);

subplot(1,2,2);
semilogy(0:N_max-1, states_8, 'g-o', 'LineWidth', 2, 'MarkerFaceColor', 'g'); grid on;
xlabel('Level N'); ylabel('Number of states (D=10)');
title('State degeneracy: ~p(N)^8 grows exponentially');
% Hagedorn temperature: partition function diverges above T_H = 1/(4π√α′)
T_Hagedorn = 1/(4*pi*sqrt(alpha_prime));
fprintf('Hagedorn temperature: T_H = 1/(4π√α′) = %.4f (in string units)\n', T_Hagedorn);
text(2, states_8(3)*2, sprintf('T_{Hagedorn} = %.3f/\sqrt{\alpha''}', 1/4/pi), 'FontSize', 9);
sgtitle('String Mass Spectrum and Regge Trajectories');

3. Virasoro Algebra and Central Charge

% ── Virasoro Algebra: [L_m, L_n] = (m-n)L_{m+n} + c/12 m(m²-1)δ ─────────
% Verify the algebra using L_n = 1/2 Σ_m α_{n-m}·α_m (classical)
% Check the critical dimension from c_total = D - 26 = 0

% Represent Virasoro algebra classically (Poisson bracket version)
% [L_m, L_n] = (m-n) L_{m+n}   (classical, c=0)
m_vals = -5:5;
fprintf('Classical Virasoro algebra structure constants:\n');
fprintf('[L_m, L_n] = (m-n) L_{m+n}\n\n');
fprintf('m  n  m-n (structure constant)\n');
fprintf('%s\n', repmat('-',1,30));
for m = [-2,-1,1,2]
  for n = [-1,0,1]
    fprintf('%2d %2d  %3d  → L_{%d}\n', m, n, m-n, m+n);
  end
end

% Quantum central charge: c = D (D free bosons)
% Ghost contribution: c_ghost = -26
% Critical dimension: D * 1 - 26 = 0 → D = 26 (bosonic)
fprintf('\n── Critical dimension calculation ──\n');
for D = 24:28
  c_matter = D;
  c_ghost  = -26;
  c_total  = c_matter + c_ghost;
  marker   = '';
  if c_total == 0, marker = ' ← CRITICAL (bosonic)'; end
  fprintf('D=%2d: c_matter=%2d, c_ghost=%3d, c_total=%3d%s\n', D, c_matter, c_ghost, c_total, marker);
end

fprintf('\n── Superstring: c_matter = D + D/2 (bosons + fermions) ──\n');
for D = 8:12
  c_matter = D + D/2;
  c_ghost  = -26 - 11;% bc + βγ superghosts
  c_total  = c_matter + c_ghost;
  marker   = '';
  if c_total == 0, marker = ' ← CRITICAL (superstring)'; end
  fprintf('D=%2d: c_matter=%.1f, c_ghost=%3d, c_total=%.1f%s\n', D, c_matter, c_ghost, c_total, marker);
end

% ── Verify quantum correction to [L_0, L_n] ──────────────────────────────
fprintf('\n── Quantum central extension: c/12 m(m²-1) ──\n');
c = 26;  % critical central charge
for m_test = [1,2,3,5]
  anomaly = c/12 * m_test * (m_test^2 - 1);
  fprintf('m=%d: anomaly term = c/12 * %d * (%d²-1) = %.1f\n', m_test, m_test, m_test, anomaly);
end

% Plot central charge vs dimension
D_range = 1:30;
c_bos = D_range;           c_total_bos = c_bos - 26;
c_sup = D_range + D_range/2; c_total_sup = c_sup - 37;
figure('Name', 'Virasoro and Critical Dimension');
plot(D_range, c_total_bos, 'b-o', D_range, c_total_sup, 'r-s', 'LineWidth', 2);
yline(0,'k--','Critical (c=0)'); grid on;
xline(26,'b:','D=26'); xline(10,'r:','D=10');
legend({'Bosonic: c=D-26','Superstring: c=3D/2-37'});
xlabel('Spacetime dimension D'); ylabel('Total central charge c_{total}');
title('Critical dimension from Weyl anomaly cancellation');

4. T-Duality: Momentum, Winding, and Mass Spectrum

% ── T-Duality: R ↔ α′/R ─────────────────────────────────────────────────
% Mass spectrum: α′M² = n²α′²/R² + w²R²/α′ + 2(N_L + N_R - 2)
% T-dual theory at R̃ = α′/R has the same spectrum with n ↔ w

alpha_prime = 1;  % string units
R_range = logspace(-1, 1, 300);  % radius from 0.1 to 10 in string units

% ── Mass spectrum for lowest-lying states ─────────────────────────────────
figure('Name', 'T-Duality');
subplot(2,2,1);
N_levels = 0;  % ground state oscillators
% Plot M²(R) for (n,w) pairs
nw_pairs = [0,0; 1,0; 0,1; 1,1; 2,0; 0,2];
leg = {};
for i = 1:size(nw_pairs,1)
  n = nw_pairs(i,1); w = nw_pairs(i,2);
  M2 = (n.^2*alpha_prime^2) ./ R_range.^2 + ...
       (w.^2) .* R_range.^2 / alpha_prime + ...
       2*(N_levels + N_levels - 2);
  semilogx(R_range/sqrt(alpha_prime), M2/(2/alpha_prime), 'LineWidth', 1.8); hold on;
  leg{end+1} = sprintf('n=%d,w=%d',n,w);
end
xline(1, 'k--', 'Self-dual R=\sqrt{\alpha''}');
xlabel('R/\sqrt{lpha''}'); ylabel('lpha'' M^2 / 2'); grid on;
legend(leg, 'Location', 'NE', 'FontSize', 8);
title('Mass spectrum vs compactification radius');
ylim([-2.5 10]);

subplot(2,2,2);
% Demonstrate T-duality symmetry: M(R) = M(α'/R)
n=2; w=3;
M2_original = (n^2*alpha_prime^2)./R_range.^2 + w^2*R_range.^2/alpha_prime;
R_dual = alpha_prime ./ R_range;
M2_dual = (w^2*alpha_prime^2)./R_range.^2 + n^2*R_range.^2/alpha_prime;
semilogx(R_range, M2_original, 'b-', R_range, M2_dual, 'r--', 'LineWidth', 2);
legend({sprintf('(n=%d,w=%d) at R',n,w), sprintf('(n=%d,w=%d) at \alpha''/R',w,n)});
grid on; xlabel('R'); ylabel('M^2');
title('T-duality: M(R) = M_{dual}(lpha''/R) [n\leftrightarrow w]');
xline(sqrt(alpha_prime), 'k--');

subplot(2,2,3);
% Momentum and winding masses separately
M2_mom  = alpha_prime^2 ./ R_range.^2;  % n=1 KK mode
M2_wind = R_range.^2 / alpha_prime;      % w=1 winding mode
semilogx(R_range, M2_mom, 'b-', R_range, M2_wind, 'r-', ...
         R_range, M2_mom+M2_wind, 'g--', 'LineWidth', 2);
xline(1, 'k:'); grid on; ylim([0 20]);
legend({'KK (n=1): ~lpha''^2/R^2','Winding (w=1): ~R^2/lpha''','Sum'});
xlabel('R/\sqrt{lpha''}'); ylabel('lpha'' M^2');
title('Momentum vs Winding: dual under R↔lpha''/R');

subplot(2,2,4);
% Enhanced gauge symmetry at self-dual point
% At R=√α′: n=w=±1 gives M²=0 → extra massless vectors → SU(2)×SU(2)
R_test = sqrt(alpha_prime);
states_at_selfdual = {'U(1)_L × U(1)_R (generic R)','+ (n,w)=(1,1) massless','+ (n,w)=(1,-1) massless','→ SU(2)_L × SU(2)_R enhanced!'};
fprintf('\nAt self-dual radius R = sqrt(alpha_prime) = %.3f:\n', R_test);
for i = 1:length(states_at_selfdual), fprintf('  %s\n', states_at_selfdual{i}); end
bar([1,2,3],[2,4,6]); grid on;
set(gca,'XTickLabel',{'Generic R','Near self-dual','R=√α″'});
ylabel('Number of massless vectors');
title('Enhanced gauge symmetry at self-dual radius');

sgtitle('T-Duality: String Theory on a Circle');

5. Veneziano Amplitude — First String Theory Formula

% ── Veneziano Amplitude: A(s,t) = B(-α(s), -α(t)) ────────────────────────
% Euler Beta function: B(a,b) = Γ(a)Γ(b)/Γ(a+b)
% Regge trajectory: α(s) = 1 + α′s
% This was the original string theory formula (Veneziano, 1968)
% It describes 4-point scattering of open string tachyons

alpha_prime = 1;   % string slope
a = 1;              % intercept: α(0) = 1 (for bosonic string open sector)

% Regge trajectory: α(s) = a + α′s
alpha_traj = @(s) a + alpha_prime * s;

% Veneziano amplitude: A(s,t) = Γ(-α(s))Γ(-α(t))/Γ(-α(s)-α(t))
% = B(-α(s), -α(t))
ven_amplitude = @(s, t) gamma(-alpha_traj(s)) .* gamma(-alpha_traj(t)) ./ gamma(-alpha_traj(s) - alpha_traj(t));

% Mandelstam variables: s+t+u = 4m², with m²= -1/α′ (tachyon)
m2 = -1/alpha_prime;  % tachyon mass squared

% ── Plot the amplitude as function of s for fixed angle ──────────────────
figure('Name', 'Veneziano Amplitude');
subplot(2,2,1);
s_vals = linspace(-3, 5, 2000);
t_fixed = -2;
A_vals = ven_amplitude(s_vals, t_fixed);
A_reg = real(A_vals);
A_reg(abs(A_reg) > 20) = NaN;  % remove poles for display
plot(s_vals, A_reg, 'b-', 'LineWidth', 1.5); grid on;
for n = 0:4  % poles at α(s) = n
  xline((n-a)/alpha_prime, 'r:');
end
xlabel('s (Mandelstam)'); ylabel('A(s,t_{fixed}=-2)');
title('Veneziano amplitude: poles = string resonances');
ylim([-15 15]);

subplot(2,2,2);
% High-energy behavior: soft exponential falloff (not power law!)
% A(s,t) ~ s^{α(t)} for large s, t fixed → Regge limit
s_large = 1:0.2:8;
A_regge = s_large .^ alpha_traj(t_fixed);  % Regge limit
A_saddle = exp(-alpha_traj(s_large) .* log(s_large./(-t_fixed)));  % Stirling approx
semilogy(s_large, abs(A_regge), 'b-', s_large, abs(A_saddle), 'r--', 'LineWidth', 2);
grid on; legend({'Regge limit: s^{α(t)}','Saddle point'});
xlabel('s'); ylabel('|A|');
title('Regge limit: s^{lpha(t)} (Regge trajectory)');

subplot(2,2,3);
% Duality: s-channel poles = t-channel poles (crossing symmetry)
% Sum over s-channel resonances = exact amplitude (no double counting!)
% This is different from QFT where s- and t-channel are separate diagrams
t_vals = linspace(-5, -0.1, 200);
s_vals2 = linspace(-5, -0.1, 200);
[TV, SV] = meshgrid(t_vals, s_vals2);
A_st = real(ven_amplitude(SV, TV));
A_st(abs(A_st)>30)=NaN;
contourf(t_vals, s_vals2, A_st, 20, 'LineColor', 'none'); colorbar; colormap(parula);
xlabel('t'); ylabel('s');
title('Veneziano amplitude A(s,t) — s↔t crossing symmetry');

subplot(2,2,4);
% Show the beta function B(a,b) = integral_0^1 x^{a-1}(1-x)^{b-1}dx
% This is the original Euler integral — string amplitudes = generalized Euler integrals
x = linspace(0.001, 0.999, 1000);
ab_pairs = {[0.5,0.5],[1,2],[2,3],[1.5,1.5]};
leg2 = {};
for i = 1:length(ab_pairs)
  a_=ab_pairs{i}(1); b_=ab_pairs{i}(2);
  y = x.^(a_-1) .* (1-x).^(b_-1);
  plot(x, y, 'LineWidth', 1.5); hold on;
  leg2{end+1} = sprintf('B(%.1f,%.1f)=%.3f', a_, b_, beta(a_,b_));
end
legend(leg2, 'FontSize', 8); grid on;
xlabel('x'); ylabel('x^{a-1}(1-x)^{b-1}');
title('Euler Beta function — the string integrand');
sgtitle('Veneziano Amplitude: Origins of String Theory');

6. Calabi-Yau Hodge Numbers and Euler Characteristic

% ── Calabi-Yau 3-fold Hodge Numbers ──────────────────────────────────────
% χ = 2(h^{1,1} - h^{2,1}): Euler characteristic
% #generations = |χ|/2 in minimal heterotic compactifications
% Mirror symmetry: h^{1,1}(X) ↔ h^{2,1}(X̃)

% ── Well-known Calabi-Yau manifolds ──────────────────────────────────────
% [h11, h21, name]
cy_data = {
  1,  101, 'Quintic (CP4[5])';
  101, 1,   'Mirror Quintic';
  2,  86,  'CP4[2,4]';
  11, 11,  'Self-mirror (K3×T2)';
  19, 19,  'Self-mirror';
  3,  3,   'χ=0 (3 gen?)';
  36, 0,   'h21=0: rigid CY';
  491, 11, 'Large h11';
};

fprintf('%-25s %6s %6s %8s %10s\n', 'Name', 'h11', 'h21', 'chi', '#gen=|chi|/2');
fprintf('%s\n', repmat('-',1,60));
for i = 1:size(cy_data,1)
  h11 = cy_data{i,1}; h21 = cy_data{i,2}; name = cy_data{i,3};
  chi = 2*(h11 - h21);
  gen = abs(chi)/2;
  marker = '';
  if gen == 3, marker = ' ★ (3 generations!)'; end
  fprintf('%-25s %6d %6d %8d %10.0f%s\n', name, h11, h21, chi, gen, marker);
end

% ── Hodge diamond visualization ───────────────────────────────────────────
figure('Name', 'Calabi-Yau Hodge Numbers');
subplot(1,2,1);
% Plot (h11, h21) pairs — the "tip of the iceberg" of the landscape
h11_all = 1:20;
h21_all = round(linspace(100,0,20) + randn(1,20)*5);
h21_all = max(0, h21_all);
scatter(h11_all, h21_all, 60, abs(2*(h11_all-h21_all))/max(abs(2*(h11_all-h21_all))), 'filled');
colormap(hot); colorbar;
hold on; plot([0 22],[0 22],'k--');  % mirror symmetry line
xlabel('h^{1,1}'); ylabel('h^{2,1}');
title('Hodge plane: each point = CY manifold (color=|chi|)');
text(2,18,'Mirror symmetry: h11 ↔ h21','FontSize',9);

subplot(1,2,2);
% Euler characteristic distribution
chi_vals = 2*(h11_all - h21_all);
bar(h11_all, chi_vals, 'FaceColor', 'cyan'); grid on;
yline(6,'r--','\chi=6 (3 generations)');
yline(-6,'g--','\chi=-6');
xlabel('h^{1,1}'); ylabel('\chi = 2(h^{1,1}-h^{2,1})');
title('Euler characteristic and generation count');
sgtitle('Calabi-Yau Compactification: Hodge Numbers and the String Landscape');

7. D-Brane Tension and the DBI Action

% ── D-Brane Tension and Dirac-Born-Infeld Action ──────────────────────────
% T_p = 1/((2π)^p α'^{(p+1)/2} g_s)  (D_p brane tension)
% S_DBI = -T_p ∫ d^{p+1}σ e^{-Φ} √(-det(G_ab + 2πα'F_ab))
% At low F: S_DBI ≈ -T_p Vol + (2πα')²/4 ∫F²  (Maxwell)

alpha_prime = 1;   % string units
g_s = 0.1;          % weak coupling
ls = 1;              % string length = √α′

fprintf('D-brane tensions T_p = 1/((2π)^p (α′)^{(p+1)/2} g_s):\n');
fprintf('g_s = %.2f, α′ = %.1f\n\n', g_s, alpha_prime);
fprintf('%-5s %-15s %-20s\n', 'p', 'T_p (string units)', 'Physical meaning');
meanings = {'D-particle','D-string','D-membrane','Phenomenological','D3: AdS/CFT','NS5 dual','D6','D7'};
for p = 0:7
  T_p = 1 / (((2*pi)^p) * alpha_prime^((p+1)/2) * g_s);
  fprintf('D%d  %-15.4g %-20s\n', p, T_p, meanings{p+1});
end

% ── DBI action: nonlinear electrodynamics on D-brane ─────────────────────
% S_DBI = -T_1/(2πα') ∫ d²σ √(1 - (2πα')²F²)  for D1-brane
% This is Born-Infeld electrodynamics — limits E ≤ E_max = 1/(2πα')
F_range = linspace(0, 1, 300);    % F in units of 1/(2πα')
L_BI    = -sqrt(1 - F_range.^2);  % Born-Infeld Lagrangian density
L_Maxwell = -1 + F_range.^2/2;   % Maxwell limit (small F)

figure('Name', 'D-Brane DBI Action');
subplot(1,2,1);
plot(F_range, -L_BI, 'b-', F_range, -L_Maxwell, 'r--', 'LineWidth', 2);
xline(1, 'k:', 'Maximum field E_{max}');
grid on; xlabel('F / E_{max}'); ylabel('Lagrangian density');
legend({'DBI: √(1-F²)','Maxwell: 1-F²/2'}); ylim([0 1.5]);
title('Born-Infeld vs Maxwell electrodynamics');

subplot(1,2,2);
% D-brane tension vs coupling: shows non-perturbative nature
g_range = logspace(-2, 0.5, 200);
T0 = 1/(2*pi*alpha_prime);
for p_plot = [0,1,2,3]
  Tp = T0./ ((2*pi)^p_plot * g_range);
  loglog(g_range, Tp, 'LineWidth', 2); hold on;
end
loglog(g_range, T0*ones(size(g_range)), 'k--', 'LineWidth', 1);  % F-string: no g_s
xlabel('g_s'); ylabel('T_p');
legend({'D0','D1','D2','D3','F-string (1/g_s^0)'}, 'Location', 'NE');
grid on; title('D-brane tension T_p ~ 1/g_s (non-perturbative!)');
sgtitle('D-Branes: Tension, DBI Action, Non-Perturbative Physics');

8. S-Duality and SL(2,ℤ) Transformation

% ── S-Duality: SL(2,Z) acting on the Type IIB axio-dilaton ───────────────
% τ = C_0 + i/g_s  (axio-dilaton, Im τ > 0)
% S-duality: τ → -1/τ  (g_s ↔ 1/g_s when C_0 = 0)
% Full SL(2,Z): τ → (aτ+b)/(cτ+d), ad-bc=1, a,b,c,d ∈ Z

% ── SL(2,Z) generators ───────────────────────────────────────────────────
% S = [[0,-1],[1,0]]: τ → -1/τ (S-duality)
% T = [[1,1],[0,1]]: τ → τ+1  (shift of axion C_0)

S_mat = [0,-1;1,0];
T_mat = [1,1;0,1];

SL2Z_transform = @(M, tau) (M(1,1)*tau + M(1,2)) ./ (M(2,1)*tau + M(2,2));

% Print fundamental transformations
tau_test = 0.3 + 2i;  % axio-dilaton with g_s = 0.5, C_0 = 0.3
fprintf('Test point: tau = %.2f + %.2fi  (g_s = %.4f)\n', real(tau_test), imag(tau_test), 1/imag(tau_test));
tau_S = SL2Z_transform(S_mat, tau_test);
fprintf('S: tau → -1/tau = %.4f + %.4fi  (g_s = %.4f)\n', real(tau_S), imag(tau_S), 1/imag(tau_S));
tau_T = SL2Z_transform(T_mat, tau_test);
fprintf('T: tau → tau+1  = %.4f + %.4fi\n', real(tau_T), imag(tau_T));

% ── Verify S² = -1 (order 4 in SL(2,Z)) ─────────────────────────────────
fprintf('\nSL(2,Z) relations:\n');
fprintf('S² = [[%d,%d],[%d,%d]]  (should be -I)\n', S_mat^2);
fprintf('(ST)³ = [[%d,%d],[%d,%d]] (should be -I)\n', (S_mat*T_mat)^3);

% ── Fundamental domain of SL(2,Z): {τ: |τ|≥1, |Re(τ)|≤1/2} ─────────────
figure('Name', 'S-Duality and SL(2,Z)');
subplot(1,2,1);
% Draw fundamental domain
theta = linspace(pi/3, 2*pi/3, 100);  % arc |τ|=1
arc_x = cos(theta); arc_y = sin(theta);
patch([-0.5, arc_x, 0.5, 0.5, -0.5], [0, arc_y, 3, 3, 0], ...
  'cyan', 'FaceAlpha', 0.2, 'EdgeColor', 'blue', 'LineWidth', 2);
hold on;
plot(arc_x, arc_y, 'b-', 'LineWidth', 2);
text(0, 1.5, 'Fundamental
Domain', 'HorizontalAlignment', 'center', 'FontSize', 10);
% S-duality images
tau_pts = [0.3+1.5i, -0.2+2i];
for tau_p = tau_pts
  tau_S_p = -1/tau_p;
  plot([real(tau_p),real(tau_S_p)], [imag(tau_p),imag(tau_S_p)], 'r-o', 'MarkerFaceColor','r', 'LineWidth',1.5);
  text(real(tau_S_p)+0.05, imag(tau_S_p)+0.05, '-1/	au', 'FontSize',8,'Color','r');
end
xlim([-1.5 1.5]); ylim([0 3]); grid on;
xlabel('Re(	au) = C_0'); ylabel('Im(	au) = 1/g_s');
title('SL(2,Z) fundamental domain of Type IIB');

subplot(1,2,2);
% (p,q) strings: F1 string has charge (1,0), D1 has (0,1)
% SL(2,Z) generates all (p,q) strings
pq_strings = {[1,0,'F1 (fundamental)'];[0,1,'D1 (D-string)'];
              [1,1,'(1,1) bound state'];[2,1,'(2,1) string'];
              [1,-1,'(1,-1) string'];[3,1,'(3,1) string']};
g_s_plot = 0.5;
theta_arr = linspace(0, 2*pi, 100);
plot(cos(theta_arr), sin(theta_arr), 'k-', 'LineWidth',0.5); hold on; axis equal;
for i = 1:size(pq_strings,1)
  p=pq_strings{i,1}; q=pq_strings{i,2}; lbl=pq_strings{i,3};
  T_pq = sqrt(p^2 + q^2/g_s_plot^2);  % tension (p,q)
  angle = atan2(q, p*g_s_plot);
  quiver(0,0,p/T_pq,q/(T_pq*g_s_plot),0,'LineWidth',2,'MaxHeadSize',0.8);
  text(p/T_pq*1.1,q/(T_pq*g_s_plot)*1.1,lbl,'FontSize',7);
end
grid on; xlabel('p'); ylabel('q/g_s');
title(sprintf('(p,q) string network at g_s=%.1f', g_s_plot));
sgtitle('S-Duality: SL(2,Z) and (p,q) Strings in Type IIB');

9. M-Theory: Dimensional Reduction to Type IIA

% ── M-Theory Reduction to Type IIA ───────────────────────────────────────
% M-theory on S^1 with radius R_11 = g_s^{2/3} l_P11
% KK modes along S^1 are the D0-branes of Type IIA
% M2-brane wrapped on S^1 → F1 string of IIA
% M2-brane transverse to S^1 → D2-brane of IIA

% Planck units: ℏ = c = k_B = 1
% Planck length: l_P11^9 = κ_{11}^2/(2π)^2

% ── Dimensional reduction: 11D SUGRA → 10D Type IIA SUGRA ────────────────
% Ansatz: ds²_{11} = e^{-2Φ/3}ds²_{10} + e^{4Φ/3}(dx^{11} + C_1)²
% where Φ = dilaton, C_1 = RR 1-form of Type IIA

fprintf('M-Theory Compactification: 11D → Type IIA (10D)\n');
fprintf('%s\n', repmat('─',1,50));
);

% Relation between M-theory and IIA parameters
% l_s = l_P11^{3/2} / R_11^{1/2}
% g_s = (R_11 / l_P11)^{3/2}
% R_11 = g_s^{2/3} l_P11

l_P = 1;     % M-theory Planck length (set to 1)
R11_range = logspace(-1, 1.5, 500);  % R_11 in Planck units

g_s   = (R11_range / l_P).^(3/2);      % IIA string coupling
l_s   = l_P.^(3/2) ./ sqrt(R11_range); % string length

% M2-brane tension vs D2-brane tension (should match)
T_M2 = 1/(((2*pi)^2) * l_P.^3);   % M2 tension
T_D2 = 1./(((2*pi)^2) .* l_s.^3 .* g_s);  % D2 tension
% These should be equal after KK reduction

% D0-brane mass = Kaluza-Klein mass
M_D0 = 1./(g_s .* l_s);   % D0-brane mass in IIA
M_KK = 1./R11_range;       % KK mass in M-theory

fprintf('R_11/l_P  g_s      l_s/l_P   M_D0 vs M_KK\n');
for R = [0.2, 0.5, 1.0, 2.0, 5.0]
  gs_ = (R/l_P)^(3/2);
  ls_ = l_P^(3/2)/sqrt(R);
  MD0_ = 1/(gs_*ls_);
  MKK_ = 1/R;
  fprintf('%8.2f  %7.4f  %8.4f  %.4f vs %.4f (ratio=%.4f)\n', R, gs_, ls_, MD0_, MKK_, MD0_/MKK_);
end

figure('Name', 'M-Theory: 11D → 10D');
subplot(1,2,1);
loglog(R11_range, g_s, 'b-', R11_range, l_s, 'r-', 'LineWidth',2);
xline(1,'k--','l_P^{11}'); yline(1,'k:'); grid on;
xlabel('R_{11}/l_P'); legend({'g_s = (R/l_P)^{3/2}','l_s = l_P^{3/2}/√R'});
title('IIA parameters vs 11th dimension radius');
regions = {'Weak coupling
IIA strings','Strong coupling
M-Theory'};
text(0.3,0.1,'IIA limit','FontSize',9); text(3,0.01,'M-Theory','FontSize',9);

subplot(1,2,2);
% Show the M-theory diagram schematically
theories = {'M-Theory\n(11D)','IIA','IIB','HetE8','HetSO32','Type I'};
x_pos = [0,-1.5,1.5,-2.5,0,2.5];
y_pos = [0,-2,-2,-4,-4,-4];
connections = [1,2;1,3;1,4;2,3;3,6;4,5;5,6];
for c = 1:size(connections,1)
  i=connections(c,1); j=connections(c,2);
  line([x_pos(i),x_pos(j)],[y_pos(i),y_pos(j)],'Color','cyan','LineWidth',1.5);
end
scatter(x_pos, y_pos, 200, 'y', 'filled');
for i = 1:length(theories)
  text(x_pos(i),y_pos(i)+0.3,strrep(theories{i},'\n',' '),'HorizontalAlignment','center','FontSize',9,'Color','white');
end
xlim([-3.5 3.5]); ylim([-5 1]); axis off;
title('Duality web');
sgtitle('M-Theory: 11D Supergravity Reduces to Type IIA');

10. AdS/CFT: Two-Point Function and Mass-Dimension Relation

% ── AdS/CFT: Bulk-to-Boundary Propagator and CFT Correlators ─────────────
% Bulk scalar field of mass m in AdS_{d+1}:
%   (□ - m²)φ = 0
%   Near boundary: φ ~ z^{d-Δ}φ_0 + z^Δ⟨O⟩  (z→0)
%   Dimension: Δ(Δ-d) = m²L²,  Δ = d/2 + √(d²/4 + m²L²)

d = 4;   % boundary dimension (N=4 SYM in 4D)
L = 1;   % AdS radius

% ── Mass-dimension relation ───────────────────────────────────────────────
fprintf('AdS5 mass-dimension relation: Δ(Δ-4) = m²L²\n');
fprintf('Δ = 2 + √(4 + m²L²)\n\n');
m2_range = [-4,-3,-2,-1,0,1,4,9,16];  % m² in units of 1/L²
fprintf('m²L²   Δ        Operator type\n');
fprintf('%s\n', repmat('-',1,40));
for m2 = m2_range
  if d^2/4 + m2 >= 0
    Delta = d/2 + sqrt(d^2/4 + m2*L^2);
    typ = 'relevant';
    if Delta == d, typ = 'marginal'; elseif Delta > d, typ = 'irrelevant'; end
    if m2 == 0, typ = [typ, ' (massless → Δ=4)']; end
    if m2 == -4, typ = [typ, ' (BF bound!)']; end
    fprintf('%6.1f  %6.3f    %s\n', m2, Delta, typ);
  end
end
fprintf('(BF bound: m²L² ≥ -d²/4 = -4 for stability)\n');

% ── Bulk-to-boundary propagator ──────────────────────────────────────────
% K(z,x; x') = (z / (z² + |x-x'|²))^Δ  (normalisation omitted)
K_btob = @(z, r, Delta) (z./(z.^2 + r.^2)).^Delta;

figure('Name', 'AdS/CFT');
subplot(2,2,1);
% Plot K(z,r) for different conformal dimensions
r = linspace(0, 5, 200);
z0 = 0.5;
for Delta = [1,2,3,4]
  K = K_btob(z0, r, Delta);
  plot(r, K/max(K), 'LineWidth', 2); hold on;
end
grid on; xlabel('|x-x''| (boundary separation)'); ylabel('K/K_{max}');
legend({'\Delta=1','\Delta=2','\Delta=3','\Delta=4'}, 'Location', 'NE');
title(sprintf('Bulk-to-boundary propagator K(z=%.1f,x)',z0));

subplot(2,2,2);
% CFT 2-point function: ⟨O(x)O(0)⟩ = C / |x|^{2Δ}
% From bulk perspective: integrate bulk action
x = logspace(-2, 1, 200);
for Delta = [1,2,3,4]
  G2 = x.^(-2*Delta);
  loglog(x, G2, 'LineWidth', 2); hold on;
end
grid on; xlabel('|x|'); ylabel('⟨O(x)O(0)⟩');
legend({'\Delta=1','\Delta=2','\Delta=3','\Delta=4'});
title('CFT 2-point functions: C/|x|^{2\Delta}');

subplot(2,2,3);
% Mass-dimension relation: plot Δ vs m²
m2_range2 = linspace(-d^2/4, 40, 200);
Delta_range = d/2 + sqrt(d^2/4 + max(0, m2_range2));
plot(m2_range2, Delta_range, 'b-', 'LineWidth', 2); hold on;
yline(d,'k--','Marginal \Delta=d'); xline(-d^2/4,'r:','BF bound'); xline(0,'g:','Massless');
grid on; xlabel('m²L²'); ylabel('\Delta = d/2 + \sqrt{d^2/4 + m^2L^2}');
title(sprintf('AdS_{%d}/CFT_{%d}: mass-dimension relation',d+1,d));

subplot(2,2,4);
% AdS geometry visualization: Poincaré patch
z_vals = linspace(0.1, 2, 20);  % radial coordinate (z=0 = boundary)
x_vals = linspace(-3, 3, 20);
[Z,X] = meshgrid(z_vals, x_vals);
% Proper length scale factor: (L/z)² at each point
scale = (L./Z).^2;
surf(Z, X, log(scale), 'EdgeColor', 'none', 'FaceAlpha', 0.7); colormap(parula);
view(40,35); xlabel('z (bulk/radial)'); ylabel('x (boundary)'); zlabel('log(L/z)²');
title('AdS_{5} geometry: curvature diverges at z→0 (boundary)');
text(0.1,0,max(max(log(scale)))*0.9, ' ← boundary (CFT)', 'FontSize',9);
sgtitle('AdS/CFT Correspondence');