---
title: Quadratic Embedding Constant
url: https://www.emergentmind.com/topics/quadratic-embedding-constant-qec
type: topic
---

# Quadratic Embedding Constant

The **Quadratic Embedding Constant** (QEC), usually denoted $\mathrm{QEC}(G)$, is a numerical invariant of a connected graph $G$ defined from its distance matrix by a constrained quadratic maximization. It occupies a central position in the study of graph metrics of negative type, quadratic embeddings into Hilbert space, and distance spectra. In finite settings it is the maximal value of the distance quadratic form on unit vectors orthogonal to the all-ones vector; in general it is formulated on finitely supported mean-zero unit functions. The sign of $\mathrm{QEC}(G)$ determines whether the graph metric admits a quadratic embedding, while explicit formulas and transformation laws are now known for paths, strongly regular graphs, joins, star products, fan graphs, and corona graphs [2201.01351, 2501.01020].

## 1. Variational definition and geometric meaning

Let $G=(V,E)$ be a connected graph with graph distance $d(x,y)$. For finite $V$, with distance matrix $D=[d(x,y)]_{x,y\in V}$, the quadratic embedding constant is
\[
\mathrm{QEC}(G)=\max\{f^\top Df:\mathbf{1}^\top f=0,\ \|f\|_2=1\}.
\]
For infinite graphs it is defined as the supremum of
\[
\sum_{x,y\in V} d(x,y)f(x)f(y)
\]
over finitely supported real functions $f$ satisfying $\sum_x f(x)=0$ and $\sum_x f(x)^2=1$ [2201.01351].

This variational formulation identifies QEC as the extremal value of the distance quadratic form on the codimension-two constraint set given by unit norm and orthogonality to constants. In the finite case, compactness guarantees that the maximum is attained [1904.08059].

The geometric significance is given by Schoenberg’s criterion. The distance matrix is conditionally negative definite if and only if
\[
\langle f,Df\rangle\le 0
\qquad\text{for all }f\perp \mathbf{1},
\]
and this is equivalent to $\mathrm{QEC}(G)\le 0$. Hence a connected graph belongs to the QE class precisely when there exists a map $\varphi:V\to\mathcal{H}$ into a Hilbert space such that
\[
d(x,y)=\|\varphi(x)-\varphi(y)\|^2,
\]
or equivalently, precisely when $\mathrm{QEC}(G)\le 0$ [2201.01351, 1904.08059].

A complementary analytic characterization relates QEC to the kernel
\[
Q=[q^{d(i,j)}]_{i,j\in V}.
\]
The condition $\mathrm{QEC}(G)\le 0$ is equivalent to positivity of this matrix for all $0\le q\le 1$ [1904.08059]. This places QEC simultaneously in Euclidean distance geometry, kernel positivity, and graph metric theory.

## 2. Spectral formulations and matrix characterizations

Because the distance matrix is real symmetric, QEC admits a spectral interpretation. If $\lambda_1(G)\ge \lambda_2(G)\ge \cdots$ are the eigenvalues of the distance matrix, then
\[
\lambda_2(G)\le \mathrm{QEC}(G)<\lambda_1(G)
\]
for finite connected graphs [2201.01351, 1904.08059]. The strict upper bound reflects Perron–Frobenius positivity of the top distance eigenvector, which is not orthogonal to $\mathbf{1}$.

When the graph is transmission regular, so that the distance matrix has constant row sum and $\mathbf{1}$ is a distance eigenvector, the variational problem reduces exactly to the second-largest distance eigenvalue:
\[
\mathrm{QEC}(G)=\theta_2(G).
\]
This identity is used explicitly for strongly regular graphs and other transmission-regular families [2501.01020].

A Lagrange multiplier formulation converts the constrained optimization into a stationary system. Writing
\[
F(f,\lambda,\mu)=\langle f,Df\rangle-\lambda(\langle f,f\rangle-1)-\mu\langle \mathbf{1},f\rangle,
\]
stationarity yields
\[
(D-\lambda I)f=\frac{\mu}{2}\mathbf{1},
\qquad
\langle f,f\rangle=1,
\qquad
\langle \mathbf{1},f\rangle=0,
\]
and the maximizing multiplier $\lambda$ is precisely $\mathrm{QEC}(G)$ [1904.08059]. This formulation underlies many exact computations.

For graphs of diameter at most $2$, the distance matrix simplifies to
\[
D=2J-2I-A,
\]
where $A$ is the adjacency matrix. In the regular case this gives
\[
\mathrm{QEC}(G)=-2-\lambda_{\min}(A),
\]
so QEC is controlled directly by the smallest adjacency eigenvalue [2001.06752]. This reduction is fundamental in the strongly regular case.

## 3. Path graphs as the foundational explicit case

Path graphs provide the canonical model for the theory. For
\[
P_n=(V,E),\qquad V=\{1,\dots,n\},\qquad d(i,j)=|i-j|,
\]
the distance matrix is $D_n=(|i-j|)_{1\le i,j\le n}$ [2201.01351].

Earlier work established that the sequence $\mathrm{QEC}(P_n)$ is strictly increasing and converges to $-\frac12$, and used this path scale to formulate classification problems for finite connected graphs [1904.08059]. A prior implicit description also expressed $\mathrm{QEC}(P_{n+1})$ as the negative of the maximal $c$ for which a matrix built from $2\min\{i,j\}-c-c\delta_{ij}$ is positive definite, and from this obtained
\[
\mathrm{QEC}(\mathbb{Z})=\mathrm{QEC}(\mathbb{Z}_+)=-\frac12
\]
by passage to the limit [1802.01214].

The decisive closed formula is
\[
\mathrm{QEC}(P_n)=\frac{-1}{1+\cos(\pi/n)},\qquad n\ge 2,
\]
together with
\[
\mathrm{QEC}(\mathbb{N})=\mathrm{QEC}(\mathbb{Z})=-\frac12
\]
for the infinite one-sided and two-sided paths [2201.01351]. Since these values are negative, all finite and infinite path graphs are of QE class.

The derivation proceeds through a positive-definiteness threshold for the matrix family
\[
A_n(s,t)=\big[\min\{i,j\}+s+t\delta_{ij}\big]_{i,j=1}^n.
\]
For path graphs,
\[
\mathrm{QEC}(P_n)=\min\left\{t\in\mathbb{R}:A_{n-1}\!\left(\frac t2,\frac t2\right)\text{ is positive definite}\right\},
\]
and determinant identities reduce this to a recurrence for polynomials $S_n(a,b;t)$:
\[
S_0(a,b;t)=1,\quad S_1(a,b;t)=at+b,
\]
\[
S_n(a,b;t)=(1+2t)S_{n-1}(a,b;t)-t^2S_{n-2}(a,b;t).
\]
A key factorization is
\[
\frac1{n+1}S_n(2,1;t)=\prod_{k=1}^n\left(t+\frac{1}{2+2\cos\left(\frac{k\pi}{n+1}\right)}\right),
\]
which isolates the positivity threshold and yields the explicit QEC formula [2201.01351].

The relation with the distance spectrum is sharp. If $\lambda_2(P_n)$ denotes the second-largest distance eigenvalue, then
\[
\lambda_2(P_n)=\mathrm{QEC}(P_n)
\]
for even $n$, whereas
\[
\lambda_2(P_n)<\mathrm{QEC}(P_n)<\lambda_1(P_n)
\]
for odd $n$ [2201.01351].

The maximizing vector can also be written explicitly:
\[
x_{n,i}=(-1)^i\sin\left(\frac{2i-1}{2n}\pi\right),\qquad i=1,\dots,n.
\]
It satisfies
\[
\sum_{i=1}^n x_{n,i}=0,\qquad \sum_{i=1}^n x_{n,i}^2=\frac n2,
\]
and
\[
\sum_{i,j=1}^n |i-j|\,x_{n,i}x_{n,j}
=
\frac{-1}{1+\cos(\pi/n)}\cdot\frac n2,
\]
so its normalized version attains $\mathrm{QEC}(P_n)$ [2201.01351].

## 4. Exact formulas for representative graph families

A substantial part of the modern theory consists of closed QEC formulas for concrete graph classes. Representative examples are as follows.

| Graph family | QEC formula or criterion |
|---|---|
| Complete graph $K_n$ | $\mathrm{QEC}(K_n)=-1$ |
| Odd cycle $C_{2n+1}$ | $\mathrm{QEC}(C_{2n+1})=-\dfrac{1}{4\cos^2(\pi/(2n+1))}$ |
| Even cycle $C_{2n+2}$ | $\mathrm{QEC}(C_{2n+2})=0$ |
| Complete bipartite graph $K_{m,n}$ | $\mathrm{QEC}(K_{m,n})=\dfrac{2(mn-m-n)}{m+n}$ |
| Two-clique graph $K_m\cup_l K_n$ | $\mathrm{QEC}(K_m\cup_l K_n)=-1+\dfrac{-(m-l)(n-l)+\sqrt{mn(m-l)(n-l)}}{m+n-l}$ |
| Star product $K_m*K_n=K_m\cup_1 K_n$ | $\mathrm{QEC}(K_m*K_n)=-\left(1+\sqrt{\left(1-\frac1m\right)\left(1-\frac1n\right)}\right)^{-1}$ |
| Strongly regular graph $\mathrm{srg}(n,k,\lambda,\mu)$, $\mu\ge1$ | $\mathrm{QEC}(G)=-s-2$ with $s=\dfrac{(\lambda-\mu)-\sqrt{(\lambda-\mu)^2+4(k-\mu)}}{2}$ |

These formulas come from several strands of the literature: complete graphs and cycles from early classification work, complete bipartite and join formulas from the study of graph joins, two-clique and star-product formulas from clique-graph methods, and the strongly regular formula from the distance-spectral analysis of diameter-$2$ regular graphs [1904.08059, 2001.06752, 2311.03342, 2501.01020].

For strongly regular graphs the result is especially rigid. If $G=\mathrm{srg}(n,k,\lambda,\mu)$ with $\mu\ge1$, then
\[
\mathrm{QEC}(G)\le 0
\quad\Longleftrightarrow\quad
k-2\lambda+\mu\le 4,
\]
and
\[
\mathrm{QEC}(G)=0
\quad\Longleftrightarrow\quad
k-2\lambda+\mu=4.
\]
Moreover, among strongly regular graphs with $\mu\ge1$, one theorem states that
\[
\mathrm{QEC}(G)\ge 0
\]
except for
\[
G=C_5=\mathrm{srg}(5,2,0,1),
\qquad
\mathrm{QEC}(C_5)=-3+\sqrt5<0
\]
[2501.01020].

For fan graphs $K_1+P_n$, the QEC is expressed through the minimal zero of a polynomial built from Chebyshev polynomials:
\[
\mathrm{QEC}(K_1+P_n)=-\tilde{\alpha}_n-2,
\]
where $\tilde{\alpha}_n$ is the minimal zero of a polynomial $\Phi_n(x)$ related to Chebyshev polynomials of the second kind. For even $n$,
\[
\mathrm{QEC}(K_1+P_n)=-4\sin^2\frac{\pi}{2(n+1)},
\]
while for odd $n$ explicit two-sided bounds are available [2403.16348, 2412.10697].

## 5. Behavior under graph operations

QEC interacts in a controlled way with several graph operations. For finite star products
\[
G=G_1\star\cdots\star G_r,
\]
if each factor has negative QEC, then
\[
\max\{Q_1,\dots,Q_r\}\le \mathrm{QEC}(G)\le \left(\frac1{Q_1}+\cdots+\frac1{Q_r}\right)^{-1}<0,
\]
where $Q_j=\mathrm{QEC}(G_j)$ [1802.01214]. If all factors are of QE class and one factor has QEC $0$, then the star product has QEC $0$ [1802.01214].

For joins of regular graphs, if $G_i$ is $r_i$-regular on $n_i$ vertices, then
\[
\mathrm{QEC}(G_1+G_2)
=
-2+\max\left\{
-\lambda_{\min}(G_1),
-\lambda_{\min}(G_2),
\frac{2n_1n_2-r_1n_2-r_2n_1}{n_1+n_2}
\right\},
\]
which yields explicit values for complete bipartite graphs, wheel graphs, friendship graphs, complete split graphs, and joins involving strongly regular graphs [2001.06752]. More recent work extends join formulas to joins with arbitrary regular graphs and complete multipartite graphs, and derives Cartesian-product formulas such as
\[
\mathrm{QEC}(K_m\times G)=m\,\mathrm{QEC}(G)
\]
for non-QE graphs $G$, together with analogous formulas for $K_{m,n}\times G$ [2508.10834].

The corona operation produces a more analytic transformation law. Under spectral assumptions on $H$,
\[
\mathrm{QEC}(G\odot H)=\psi_{H*}^{-1}(\mathrm{QEC}(G)),
\]
where $\psi_H$ is built from the main eigenvalues of the adjacency matrix of $H$ [2512.17258]. A later refinement gives
\[
\mathrm{QEC}(G\odot H)=\max\{\psi_H^{-1}(\mathrm{QEC}(G)),\gamma_2,\gamma_3\},
\]
with $\gamma_2$ and $\gamma_3$ determined by singular spectral contributions of $A_H$ [2603.14962]. When $H$ is $\kappa$-regular on $n$ vertices,
\[
\psi_H^{-1}(\mathrm{QEC}(G))
=
\frac12\left\{(n+1)\mathrm{QEC}(G)-(\kappa+2)
+\sqrt{\big((n+1)\mathrm{QEC}(G)-(\kappa+2)\big)^2+4(\kappa+2)\mathrm{QEC}(G)}\right\},
\]
and the same work proves
\[
G\odot H\text{ belongs to the QE class}
\quad\Longleftrightarrow\quad
G\text{ belongs to the QE class and }\min\mathrm{ev}(A_H)\ge -2
\]
for regular $H$ [2603.14962].

These formulas show that QEC is not merely an isolated invariant; it is functorial enough to support exact transfer laws under several nontrivial graph constructions.

## 6. Structural obstructions, clique geometry, and classification

A major structural threshold is $-\frac12$. If a connected graph satisfies
\[
\mathrm{QEC}(G)<-\frac12,
\]
then it cannot contain an induced diamond $K_4\setminus\{e\}$ or an induced claw $K_{1,3}$, because both of those graphs have QEC exactly $-\frac12$. The same line of argument gives further forbidden induced subgraphs:
\[
C_4
\quad\text{and}\quad
C_5,
\]
since induced $C_4$ forces QEC at least $0$ and induced $C_5$ forces QEC at least $-\frac{2}{3+\sqrt5}$ [1904.08059].

A sharper clique-theoretic description is available. If $\Gamma(G)$ denotes the clique graph whose vertices are the maximal cliques of $G$, then for graphs with $\mathrm{QEC}(G)<-\frac12$:
\[
\Gamma(G)\text{ is a tree},
\]
adjacent maximal cliques intersect in exactly one vertex, and no three distinct maximal cliques have nonempty triple intersection [2311.03342]. In that precise sense, such graphs admit a cactus-like decomposition into maximal cliques glued along cut vertices.

This structure supports classification along the increasing path scale
\[
\mathrm{QEC}(P_2)<\mathrm{QEC}(P_3)<\cdots<\mathrm{QEC}(P_d)<\mathrm{QEC}(P_{d+1})<\cdots\to -\frac12.
\]
If
\[
\mathrm{QEC}(G)<\mathrm{QEC}(P_d),
\]
then
\[
\mathrm{diam}(G)\le d-2,
\qquad
\mathrm{diam}(\Gamma(G))\le d-3
\]
[2311.03342]. The intervals near the bottom of the scale are already classified: below $\mathrm{QEC}(P_3)$ only complete graphs occur, and between $\mathrm{QEC}(P_3)$ and $\mathrm{QEC}(P_4)$ the graphs are exactly $K_n\star K_2$ with $n\ge2$ together with $K_3\star K_3$ [1904.08059].

Beyond clique obstructions, theta graphs provide a different source of non-QE behavior. For bipartite graphs, Tanaka’s criterion links quadratic embeddability to the absence of Tanaka quintuples; for theta graphs the existence of Tanaka quintuples and modified Tanaka quintuples yields large families of non-QE examples. In particular, non-QE theta graphs are primary non-QE graphs, and there exists a non-QE theta graph on each number of vertices $n\ge 5$ [2409.17662].

Taken together, these results present QEC as both a spectral invariant and a structural classifier. Its sign governs quadratic embeddability, its exact values encode delicate spectral data of the distance matrix, and threshold ranges such as $\mathrm{QEC}(G)<-\frac12$ force stringent global geometry on the graph.

Source: https://www.emergentmind.com/topics/quadratic-embedding-constant-qec