Abstract: Does every $n$-vertex Cayley graph have an orthonormal eigenbasis all of whose coordinates are $O(1/\sqrt{n})$? While the answer is yes for abelian groups, we show that it is no in general.On the other hand, we show that every $n$-vertex Cayley graph (and more generally, vertex-transitive graph) has an orthonormal basis whose coordinates are all $O(\sqrt{\log n / n})$, and that this bound is nearly best possible.Our investigation is motivated by a question of Assaf Naor, who proved that random abelian Cayley graphs are small-set expanders, extending a classic result of Alon--Roichman. His proof relies on the existence of a bounded eigenbasis for abelian Cayley graphs, which we now know cannot hold for general groups. On the other hand, we navigate around this obstruction and extend Naor's result to nonabelian groups.

\section{Introduction}

\subsection{Bounded eigenbasis}

It is a fundamental problem to understand the spectral decomposition of a Cayley graph. Since every vertex in a Cayley graph has the same degree, it does not matter whether we are talking about the adjacency matrix or the Laplacian matrix, but we will stick with the adjacency matrix for concreteness.
Enormous attention has been given to the eigenvalues of Cayley graphs, especially the spectral gap, due to an intimate connection with the expansion properties of the graph \cite{HLW06,Lub12}.
In this paper, we study the complementary question of what can arise as eigenvectors of Cayley graphs.

We adopt the following normalization\footnote{This normalization, viewing $x$ as a function on a set or group equipped with the averaging measure, is different from the normalization used in the abstract, where we use the usual Euclidean distance in $\mathbb R^n$.}. Given a finite set $S$ and a function $x \colon S \to \mathbb C$ (sometimes viewed as a vector $x \in \mathbb C^S$), we denote its $L^p$ norm by
\[
\norm{x}_{L^p(S)}:= \paren{\mathbb E_{s \in S} \abs{x(s)}^p}^{1/p}.
\]
The Hermitian inner product is defined by $\sang{x, y} = \mathbb E_{s \in S} \overline{x(s)} y(s)$. We say that $x$ is \emph{$C$-bounded} if $\snorm{x}_{L^\infty(S)} \le C$, and we say that a set of functions is $C$-bounded if all of its elements are $C$-bounded. In a unitary or orthonormal eigenbasis, each eigenfunction $x$ is normalized as $\snorm{x}_{L^2(S)} = 1$.

Below is the main question that we study. Here our Cayley graphs are unweighted and undirected. A Cayley graph on a finite group $G$ with symmetric generator $S = S^{-1}$ (not containing the identity) has edges of form $(g,sg)$ ranging over all $g\in G$ and $s \in S$.

\begin{question} \label{qn:main}
What is the minimum $C(n)$ so that every $n$-vertex Cayley graph has a $C(n)$-bounded unitary (or orthonormal) eigenbasis?
\end{question}

Every abelian Cayley graph has a $1$-bounded unitary eigenbasis.
Indeed, given an abelian group $G$, the basis of Fourier characters of $G$ forms an eigenbasis for every Cayley graph on $G$. In particular, all coordinates of such a Fourier basis are are roots of unity.
The existence of a bounded eigenbasis is useful in certain applications.
In fact, the initial motivation for this work is a result of Naor~\cite{Nao12} that proves a certain small-set expansion property of random abelian Cayley graphs, extending a classic result of Alon--Roichman~\cite{AR94} that random Cayley graphs on arbitrary groups are expanders.
Naor's argument uses that every abelian Cayley graph has a $1$-bounded eigenbasis.
He asks whether his results also hold for nonabelian groups.
Here we show that general Cayley graphs do not always have a bounded eigenbasis, therefore exhibiting an obstruction to Naor's argument for nonabelian groups.
On the other hand, we provide an alternative argument showing that Naor's theorem indeed extends to general groups. See \cref{thm:naor-nonabelian} below for a precise statement.

Our first result below implies that Cayley graphs do not always have a bounded unitary eigenbasis.
It gives a lower bound $C(n) \gtrsim \sqrt{\log n}/\log\log n$ for \cref{qn:main} for infinitely many $n$.
(Notation: we write $A \lesssim B$ and $A = O(B)$ to mean that $A \le C B$ for some constant $C > 0$.)

\begin{theorem} \label{thm:lower}
There exist infinitely many Cayley graphs $G$ whose adjacency matrix
has an eigenspace all of whose eigenfunctions $x \colon G \to \mathbb C$ satisfy $\norm{x}_{L^\infty(G)} \ge c\norm{x}_{L^2(G)} \sqrt{\log n} / \log\log n $, where $n$ is the number of vertices and $c > 0$ is some absolute constant.
\end{theorem}

The next result gives a nearly matching upper bound of $C(n) \lesssim \sqrt{\log n}$ for \cref{qn:main}.

\begin{theorem}\label{thm:upper-cayley}
Every Cayley graph has an orthonormal $C\sqrt{\log n}$-bounded eigenbasis, where $n$ is the number of vertices and $C$ is some absolute constant.
\end{theorem}

More generally, the same upper bound holds for vertex-transitive graphs.

\begin{theorem}\label{thm:upper-transitive}
Every vertex-transitive graph has an orthonormal $C\sqrt{\log n}$-bounded eigenbasis, where $n$ is the number of vertices and $C$ is some absolute constant.
\end{theorem}

It remains an intriguing open problem to close the gap between the upper and lower bounds.
This problem appears to be related to a recent deep and difficult result of Green~\cite{Gre20}, who showed that the maximum possible width of a finite transitive subset of the unit sphere in $\mathbb R^d$ is on the order of $1/\sqrt{\log d}$ (in sharp constrast to infinite subsets, e.g., the entire sphere has width 1). Green's theorem answers a question of the third author, which was in turn prompted by \cite{CZ17} and this work.
Green's proof relies on the classification of finite simple groups.

Let us mention a few directions worth further investigation.
First, our construction proving \cref{thm:lower} uses graphs of increasing degree. Can one also find bounded degree Cayley graphs without a bounded eigenbasis?

\begin{conjecture}
There exists some $d$ such that for every $C$ there exists a $d$-regular Cayley graph without an orthonormal $C$-bounded eigenbasis.
\end{conjecture}

Another direction worth exploring further is to understand what families of groups always have bounded eigenbasis.
Extending the example of abelian groups, it is not hard to show using nonabelian Fourier analysis that in a group where every irreducible representation has dimension at most $d$, every Cayley graph has a $\sqrt{d}$-bounded unitary eigenbasis. Given these examples, a natural question is if for more natural classes of ``nearly abelian'' groups, every Cayley graph has a bounded eigenbasis.
\begin{question}\label{ques:nilpotent-affine}
Do Cayley graphs on nilpotent groups of bounded step always have bounded eigenbasis?
What about affine groups?
\end{question}

The general problem of characterizing groups with the bounded eigenbasis property is somewhat reminiscent of the characterization of approximate groups by Breuillard, Green, and Tao~\cite{BGT12}, which unifies classic theorems of Freiman on sets of bounded doubling \cite{Fre73} and Gromov on groups of polynomial growth \cite{Gro91}.

Let us mention that another instance where a bounded eigenbasis came in handy was in studying the relationship between discrepancy and eigenvalues of Cayley graphs.
Kohayakawa, R\"odl, and Schacht~\cite{KRS16} showed that for abelian Cayley graphs, having small discrepancy is equivalent to having small second eigenvalues, with a spectral proof suggested by Gowers.
The proof relies on the bounded eigenbasis of abelian Cayley graphs.
The abelian hypothesis was later removed by Conlon and Zhao~\cite{CZ17} via an application of Grothendieck's inequality.

The boundedness of eigenfunctions has an appealing interpretation for \emph{spectral graph drawings}. Hall's spectral drawing of a graph~\cite{Hal70} (also see Spielman's survey \cite{Spi12}, which contains some nice figures) places each vertex $v$ at $(x(v), y(v)) \in \mathbb R^2$, where $x$ and $y$ are eigenfunctions corresponding to the second and third eigenvalues of the graph Laplacian (here $x$ and $y$ are assumed orthogonal and properly scaled). This drawing has the property that it minimizes the sum of squared edge-lengths among all drawings of the graph in $\mathbb R^2$ with the vertices in isotropic position (so that $x$ and $y$ coordinates each have variance 1 and are uncorrelated). Every abelian Cayley graph has a spectral drawing where all the coordinates are bounded.
On the other hand, \cref{thm:lower} gives us an example of a Cayley graph where no spectral drawing can fit inside a disk of radius $c \sqrt{\log n}/\log\log n$ (provided that the eigenspace in the theorem corresponds to the second and third eigenvalues, which can be achieved; see the end of \cref{sec:construction} for further details). Some examples of spectral drawings of Cayley graphs used in the proof of \cref{thm:lower} are shown in \cref{fig:spectral-drawing}.

\begin{figure}[t]
\centering
\subfloat[$G = S_3 \ltimes (\mathbb Z/2\mathbb Z)^3$]{{\includegraphics[width=7cm]{Red_48-compressed.pdf}}}
\qquad
\subfloat[$G = S_4 \ltimes (\mathbb Z/2\mathbb Z)^4$]{{\includegraphics[width=7cm]{Graph_Red_384-compressed.pdf}}}

\caption{Some spectral drawings of Cayley graphs used in the proof of \cref{thm:lower}, corresponding to the group $G = S_d \ltimes (\mathbb Z/2\mathbb Z)^d$, drawn for $d \in \{3,4\}$. Such a spectral drawing requires a canvas of side-lengths on the order of $\sqrt{d/\log d}$, where vertices have uncorrelated $x$ and $y$ coordinates each having variance 1. See the remark at the end of \cref{subsec:unweighted} on how these figures were generated.} \label{fig:spectral-drawing}
\end{figure}

\subsection{Random Cayley graphs are small-set expanders}

A classic result due to Alon and Roichman~\cite{AR94} shows that in a random Cayley graph of a group $G$ generated by $k > C\epsilon^{-2} \log \abs{G}$ independent and uniform random group elements, all eigenvalues other than the top one has absolute value at most $k\epsilon$. In particular, via the expander mixing lemma, it implies that for every $\emptyset \neq X \subsetneq G$,
\[
\abs{ \frac{e(X, G \setminus X) }{\frac{2k}{\abs{G}} \abs{X}\abs{G\setminus X}} - 1} \le \epsilon,
\]
where $e(A,B)$ counts the number of edges with one endpoint in $A$ and the other in $B$.

Naor~\cite{Nao12} developed a new Banach space-valued Azuma inequality and proved more refined small-set isoperimetry inequalities in random Cayley graphs of abelian groups, and he asked whether his result can be extended to all groups. Here we answer his question affirmatively.
In the following theorem, by ``the Cayley (multi)graph associated $k$ independent uniformly chosen random group elements'' we mean the following: select random $g_1, \dots, g_k$ and take the Cayley graph generated by $g_1, g_1^{-1}, \dots, g_k, g_k^{-1}$, taken with multiplicity. Allowing multiplicities makes the result a bit easier to state, and is a technicality that one should feel free to ignore (in many parameter ranges multiplicities are unlikely to occur).

\begin{theorem} \label{thm:naor-nonabelian}
There exists a universal constant $C > 0$ such that for every positive integer $k$ and every group $G$, with probability at least $1/2$, the Cayley (multi)graph associated to $k$ independent uniformly chosen random group elements has the property that for every $X \subseteq G$ with $1 < \abs{X} \le \abs{G}/2$, the number of edges $e(X, G\setminus X)$ between $X$ and $G \setminus X$ satisfies
\[
\abs{ \frac{e(X, G \setminus X) }{\frac{2k}{\abs{G}} \abs{X}\abs{G\setminus X}} - 1} \le C \sqrt{\frac{\log \abs{X}}{k}}.
\]
\end{theorem}

Naor proved \cref{thm:naor-nonabelian} for abelian groups. His proof relies on a bounded eigenbasis of abelian Cayley graphs. In \cref{sec:small-set-expansion} we explain how to bypass this obstacle in order to prove the result for nonabelian groups.

\medskip

\noindent \textbf{Acknowledgments.} Zhao thanks Assaf Naor for discussions and for encouraging him to work on this problem. We thank Shengtong Zhang for pointing out some typographical errors.

\section{Preliminaries}\label{sec:background}

\subsection{Nonabelian Fourier transform}\label{subsec:fourier}
We begin by summarizing some standard facts on nonabelian Fourier analysis (e.g., \cite{GW10}).
Given a finite group $G$, let $\widehat{G}$ denote the set of irreducible unitary representations of $G$.
For each representation $\rho \in \widehat G$, call its dimension $d_\rho$, and call the space that it acts on $W_\rho \cong \mathbb C^{d_\rho}$.
For any $f: G\to\mathbb{C}$ and $\rho\in\widehat{G}$, its Fourier transform evaluated at $\rho$ is given by
\[
\widehat{f}(\rho) = \mathbb{E}_{g\in G}f(g)\rho(g),
\]
which is an endomorphism of $W_\rho$ (i.e., $\widehat{f}(\rho)\in\operatorname{End}W_\rho$).
There is an inversion formula, namely
\[f(g) = \sum_{\rho\in\widehat{G}}d_\rho\langle\rho(g),\widehat{f}(\rho)\rangle_\mathrm{HS}\]
where $\langle A,B\rangle_\mathrm{HS} = \operatorname{Tr}(A^\dagger B)$ is the Hilbert–Schmidt inner product,
which is just the entry-wise Hermitian product of matrices.
The Hilbert--Schmidt norm is written as $\|A\|_\mathrm{HS} = \sqrt{\operatorname{Tr}(A^\dagger A)}$.
We have Parseval's identity
\[\langle f_1,f_2\rangle_{L^2(G)} = \mathbb{E}_{g\in G}\overline{f_1(g)}f_2(g) = \sum_{\rho\in\widehat{G}}d_\rho\langle\widehat{f_1}(\rho),\widehat{f_2}(\rho)\rangle_\mathrm{HS},\]
and in particular,
\[\mathbb{E}_{g\in G}|f(g)|^2 = \sum_{\rho\in\widehat{G}}d_\rho\|\widehat{f}(\rho)\|_\mathrm{HS}^2.\]
Finally, we define a convolution of two functions $f_1,f_2: G\to\mathbb{C}$ via
\[(f_1\ast f_2)(g) = \mathbb{E}_{h\in G}f_1(gh^{-1})f_2(h).\]
The Fourier transform turns convolution into matrix multiplication:
\[\widehat{f_1\ast f_2}(\rho) = \widehat{f_1}(\rho)\widehat{f_2}(\rho)\]
for all $\rho\in\widehat{G}$.

\subsection{Eigendecomposition}\label{subsec:eigendecomposition}
Given a function $f: G\to\mathbb{C}$, we consider the operator $M_f$ acting on $\mathbb C^G$, the space of functions $G \to \mathbb C$, via
\[
M_f x = f \ast x,
\]
i.e., $(M_f x)(g) = \mathbb E_{h \in G} f(gh^{-1}) x(h)$ for all $x \colon G \to \mathbb C$ and $g \in G$.
Equivalently, one can also view $M_f$ as a matrix with rows and columns indexed by $G$, whose entry in position $(g,h) \in G \times G$ is $f(gh^{-1})/\abs{G}$.
Then, viewing $x \in \mathbb C^G$ as a vector, the matrix product $M_f x$ agrees with the definition above.
The matrix can be thought of as the adjacency matrix (after suitable normalization) of a Cayley graph.
Let us explain how to analyze the eigendata of $M_f$ using the Fourier transform.

Assume from now on that $f(g^{-1}) = \overline{f(g)}$ for every $g\in G$. Then
\[\widehat{f}(\rho) = \mathbb{E}_{g\in G}f(g)\rho(g)\]
is Hermitian.
For any $x: G\to\mathbb{C}$, applying the Fourier transform, we see that
$x$ is an eigenfunction of $M_f$ with eigenvalue $\lambda$ (i.e., $f\ast x = \lambda x$) if and only if
\[\widehat{f}(\rho)\widehat{x}(\rho) = \lambda\widehat{x}(\rho)\quad \text{ for all } \rho\in\widehat{G},\]
i.e., all columns of $\widehat{x}(\rho)$ (when viewed as a $d_\rho \times d_\rho$ matrix) lie in the eigenspace of $\widehat{f}(\rho)$ corresponding to the eigenvalue $\lambda$.

Let $V_\rho$ be the subspace of functions whose Fourier transform is supported on $\rho$:
\begin{align}
V_\rho &= \{x\in L^2(G): \operatorname{supp}\widehat{x}\subseteq\{\rho\}\} \nonumber
\\
&= \{x \in L^2(G) : x(g) = d_\rho \ang{\rho(g), A} \text{ for some } A \in \operatorname{End} W_\rho \}.
\label{eq:Vrho}
\end{align}
For any column vector $\mathbf{v}\in W_\rho$, we define
\begin{align}
V_{\rho,\mathbf{v}}
&= \{ x \in V_\rho : \text{every column of } \widehat x (\rho) \text{ is a multiple of }\mathbf{v}\} \nonumber
\\
&= \{x\in L^2(G): x(g) = d_\rho\sang{\rho(g),\mathbf{v}\mathbf{w}^\dagger}_\mathrm{HS}\text{ for some  }\mathbf{w}\in W_\rho\} \subseteq V_\rho.\label{eq:Vrhov}
\end{align}
In particular, if $\widehat f(\rho) \mathbf{v} = \lambda \mathbf{v}$ for some $\lambda \in \mathbb R$, then
$M_f x = \lambda x$ for all $x \in V_{\rho,\mathbf{v}}$ (as can be seen by taking the Fourier transform).
Furthermore, if $\mathbf{v}, \mathbf{v}' \in W_\rho$ with $\mathbf{v}^\dagger \mathbf{v}' = 0$, then $\ang{x,x'} = 0$ for all $x \in V_{\rho, \mathbf{v}}$ and $x' \in V_{\rho, \mathbf{v}'}$.

To summarize, we have an orthogonal decomposition (the orthogonality is easy to check via the Fourier transform)
\[
    \mathbb C^G = \bigoplus_\rho V_\rho.
\]
For each $\rho \in \widehat G$, let $\mathbf{v}_1^\rho,\ldots,\mathbf{v}_{d_\rho}^\rho \in W_\rho$ be an eigenbasis of $\widehat f(\rho) \in \operatorname{End} W_\rho$, and call the corresponding eigenvalues $\lambda_{\rho,1},\ldots,\lambda_{\rho,d_\rho}$. We have an orthogonal decomposition
\[
    V_\rho = \bigoplus_{j=1}^{d_\rho}V_{\rho,\mathbf{v}_j^\rho}
\]
and $M_f x = \lambda_j^\rho x$ for each $x \in V_{\rho, \mathbf{v}_j^\rho}$.
Thus the eigenvalues of $M_f$ consists of $\lambda_{\rho, j}$ with multiplicity $d_\rho$, ranging over all $\rho \in \widehat G$ and $j \in [d_\rho]$. The eigenspace of $M_f$ corresponding to an eigenvalue $\lambda$ is
the direct sum of all $V_{\rho, \mathbf{v}_j^\rho}$ ranging over all $\rho \in \widehat G$ and $j \in [d_\rho]$ with $\lambda_{\rho, j} = \lambda$.

\subsection{Schatten norms} \label{sec:schatten}
The Schatten $p$-norm $\snorm{A}_{S_p}$ of a matrix $A\in\mathbb C^{n\times n}$ is defined via
\[\snorm{A}_{S_p}^p = \sum_{i=1}^n\sigma_i(A)^p,\]
where $\sigma_1(A), \dots, \sigma_n(A)$ are the singular values of $A$.

The Schatten $p$-norm satisfies a noncommutative H\"older's inequality (e.g., \cite[Corollary~IV.2.6]{Bha97}): for $1\le p\le q\le \infty$ with $1/p + 1/q = 1$, we have
\begin{equation}\label{eq:Hold}
\sang{A,B}_\mathrm{HS}\le\snorm{A}_{S_p}\snorm{B}_{S_q}.
\end{equation}

Given a function $f \colon G \to \mathbb C$ on a finite group $G$,
we define its Schatten $p$-norm $\norm{f}_{S_p}$ to be the Schatten $p$-norm of its associated matrix $M_f$ (giving the linear map $x \mapsto f \ast x$ on $\mathbb C^G$):
\begin{equation} \label{eq:Sp}
\norm{f}_{S_p}
= \paren{\sum_i \sigma_i(M_f)^p}^{1/p}
= \paren{\sum_\rho d_\rho \snorm{\widehat{f}(\rho)}_{S_p}^p}^{1/p}.
\end{equation}

\section{Construction} \label{sec:construction}

In this section, we prove \cref{thm:lower} by constructing a Cayley graph on a group $G$ with an eigenspace all of whose eigenfunctions satisfy $\norm{x}_{L^{\infty(G)}} \gtrsim \norm{x}_{L^2(G)} \sqrt{\log\abs{G}}/\log\log \abs{G}$.

To motivate our construction, we first explain in \cref{subsec:unitary-group} what happens for the unitary group $G = U(d)$, which is simpler to analyze although it is not finite.
Then, in \cref{subsec:weighted}, we explain how to construct an edge-weighted Cayley graph on a certain finite subgroup of $U(d)$.
We then explain in \cref{subsec:unweighted} how to convert the edge-weighted construction to an unweighted construction via sampling, and show that eigenvectors maintain their desired properties.
Only \cref{subsec:unweighted} is required for the proof of \cref{thm:lower}, and the earlier subsections are solely for motivation, but we hope that they are helpful to the readers.

\subsection{Unitary group}\label{subsec:unitary-group}
Let $G = U(d)$.
Let $\rho$ denote the standard representation of $G$ on $\mathbb C^d$, which is irreducible.
Let $V_\rho$ denote the subspace of $L^2(G)$ consisting of all $x \in L^2(G)$ of the form $x(g) = d \sang{\rho(g), A}_\mathrm{HS}$ for some $A \in \mathbb C^{d\times d}$ , i.e., the Fourier transform $\widehat{x}$ is supported at $\rho$ and $\widehat{x}(\rho) = A$. Note that this definition of $V_\rho$ agrees with our earlier definition in \cref{eq:Vrho} for finite groups.

\begin{claim}\label{clm:init-inequality} For any $x \in V_\rho$, we have $\|x\|_{L^\infty(G)} \ge \sqrt{d} \|x\|_{L^2(G)}$.
\end{claim}
\begin{proof}
Let $A \in \mathbb C^{d \times d}$ be such that $x(g) = d \sang{\rho(g), A}_\mathrm{HS}$. By Fourier inversion and Parseval, $\snorm{x}_{L^2(G)} = \sqrt{d}\snorm{A}_\mathrm{HS}$. Thus we have
\[
\|x\|_{L^\infty(G)} = d \sup_{U \in U(d)}\sang{U, A}_\mathrm{HS} = d \snorm{A}_{S_1} \ge d\snorm{A}_{S_2} = d \snorm{A}_\mathrm{HS} = \sqrt{d} \|x\|_{L^2(G)}
\]
by definition of $\rho$ and duality of the Schatten norms.
\end{proof}

For a sufficiently generic  $f \colon G \to \mathbb C$ (assuming no unwanted eigenvalue collisions),
the subspace $V_\rho$ is a direct sum of eigenspaces of the operator $M_f$, there by giving a continuous analog of \cref{thm:lower}. The actual construction proving \cref{thm:lower} will involve a discretization of this construction.

\subsection{Weighted construction}\label{subsec:weighted}
In this section we prove a weighted analogue of \cref{thm:lower} which serves as a stepping stone towards the entire proof. Recall from earlier that for a function $f: G\to\mathbb C$ we have $M_f(g,h) = f(gh^{-1})/\abs{G}$.
\begin{theorem}\label{thm:main-signed-weighted}
There exist some constant $c > 0$ and infinitely many groups $G$ and functions $f:G\to \mathbb R$ such that $M_f$ has an eigenspace all of whose elements $x$ satisfy
\[
\norm{x}_{L^\infty(G)} \ge c\frac{\sqrt{\log \abs{G}} }{ \log\log \abs{G}} \norm{x}_{L^2(G)}.
\]
\end{theorem}

Let $G = S_d \ltimes (\mathbb Z/2\mathbb Z)^d$, where $S_d$ acts on $(\mathbb Z/2\mathbb Z)^d$ by permuting coordinates.
The group has a natural $d$-dimensional representation on $\mathbb C^d$, which we call $\rho$, where $S_d$ permutes the coordinates and $(\mathbb Z/2\mathbb Z)^d$ flips the signs of the coordinates.
It is easy to check that $\rho$ is irreducible.

We need a $G$-orbit on the unit sphere in $\mathbb C^d$ with large width in every direction.
The next lemma serves as a finitary analogue of \cref{clm:init-inequality}.
This lemma also appears in \cite{Gre20} and we include its proof here for the convenience of the reader.

\begin{lemma}\label{lem:sup-inequality}
Let $\mathbf{a}$ be the unit vector in the direction of $(1,1/\sqrt{2},\ldots,1/\sqrt{d})$. Then for any $\mathbf{v}\in\mathbb{C}^d$ we have
\[\sup_{g\in G}|\langle\mathbf{v},\rho(g)\mathbf{a}\rangle|\gtrsim\frac{|\mathbf{v}|}{\sqrt{\log d}}.\]
\end{lemma}

\begin{remark}
A difficult recent result of Green~\cite{Gre20}, confirming a conjecture of Zhao, showed that for every \emph{finite} subgroup $G$ of $U(d)$ and every unit vector $\mathbf{a} \in \mathbb C^d$, there is some unit vector $\mathbf{v}$ such that $\sup_{g \in G} \abs{\ang{\mathbf{v}, \rho(g)\mathbf{a}}} \lesssim 1/\sqrt{\log d}$ (i.e., a tight upper bound on the width of every finite transitive subset of a sphere).
In contrast, the width of an infinite transitive subset of the sphere can be as large as $1$ (e.g., the entire sphere).
It is initially quite counterintuitive that a finiteness assumption implies such a dramatic reduction in the width of an orbit.
\end{remark}

\begin{proof}
Let us first assume that $\mathbf{v}\in\mathbb R^d$, so
\[\sup_{g\in G}|\langle\mathbf{v},\rho(g)\mathbf{a}\rangle| = \sup_{g\in G}|\langle\rho(g)\mathbf{v},\mathbf{a}\rangle|\ge\langle\mathbf{w},\mathbf{a}\rangle,\]
where $\mathbf{w}$ is the vector obtained by making the coordinates of $\mathbf{v}$ nonnegative and then rearranging them in nonincreasing order. Let $\mathbf{w} = (w_1,\ldots,w_d)$ with $w_1\ge\cdots\ge w_d\ge 0$. Then
\begin{align*}
\paren{\sum_{j=1}^{d}\frac{1}{j}}\langle\mathbf{w},\mathbf{a}\rangle^2 &= \left(\sum_{j=1}^d\frac{w_j}{\sqrt{j}}\right)^2\\
&\gtrsim w_1^2+\frac{w_2}{\sqrt{2}}\left(w_1+\frac{w_2}{\sqrt{2}}\right)+\frac{w_3}{\sqrt{3}}\left(w_1+\frac{w_2}{\sqrt{2}}+\frac{w_3}{\sqrt{3}}\right)\cdots\\
&\gtrsim w_1^2+\frac{w_2^2}{\sqrt{2}}\left(1+\frac{1}{\sqrt{2}}\right)+\frac{w_3^2}{\sqrt{3}}\left(1+\frac{1}{\sqrt{2}}+\frac{1}{\sqrt{3}}\right)+\cdots\\
&\gtrsim w_1^2+\cdots+w_d^2 = |\mathbf{w}|^2 = |\mathbf{v}|^2.
\end{align*}
Thus
\[\sup_{g\in G}|\langle\mathbf{v},\rho(g)\mathbf{a}\rangle|\gtrsim\frac{|\mathbf{v}|}{\sqrt{\log d}}.\]

Finally, when $\mathbf{v}\in\mathbb C^d$, we can reduce to the real case.
Assume without loss of generality (since $\rho$ is real) that $|\operatorname{Re}\mathbf{v}|\ge|\operatorname{Im}\mathbf{v}|$. Then
\[\sup_{g\in G}|\langle\mathbf{v},\rho(g)\mathbf{a}\rangle|\ge\sup_{g\in G}|\langle\operatorname{Re}\mathbf{v},\rho(g)\mathbf{a}\rangle|\gtrsim\frac{|\operatorname{Re}\mathbf{v}|}{\sqrt{\log d}}\ge\frac{|\mathbf{v}|}{\sqrt{2\log d}}. \qedhere \]
\end{proof}
\begin{proof}[Proof of \cref{thm:main-signed-weighted}]
Let $\mathbf{a}$ be as in \cref{lem:sup-inequality} (viewed as a column vector). Define $f \colon G \to \mathbb R$ via
\[f(g) = d\sang{\rho(g),\mathbf{a}\mathbf{a}^\intercal}_\mathrm{HS}.\]
Therefore, by Fourier inversion, $\widehat{f}$ is supported at $\rho$ and $\widehat{f}(\rho) = \mathbf{a}\mathbf{a}^\intercal$. That is, $f\in V_\rho$ (as in \cref{eq:Vrho}).

As in \cref{eq:Vrhov}, let $V_{\rho,\mathbf{a}}$ denote the subspace of $L^2(G)$ consisting of all $x \in L^2(G)$ of the form $x(g) = d\sang{\rho(g), \mathbf{a}\mathbf{v}^\dagger}_\mathrm{HS}$ for some $\mathbf{v} \in \mathbb C^d$.
From the discussions in \cref{subsec:eigendecomposition}, we see that $M_f$ has exactly one nonzero eigenvalue, namely $1$, and its eigenspace is $V_{\rho,\mathbf{a}}$.

We claim that
\[\|x\|_{L^\infty(G)} \gtrsim \sqrt{\frac{d}{\log d}} \|x\|_{L^2(G)}\]
for all $x \in V_{\rho, \mathbf{a}}$. Letting $x(g) = d\sang{\rho(g), \mathbf{a}\mathbf{v}^\dagger}_\mathrm{HS}$, we have
\[\|x\|_{L^\infty(G)} = d \sup_{g \in G} | \sang{\rho(g), \mathbf{a}\mathbf{v}^\dagger}_\mathrm{HS}| = d\sup_{g \in G} | \sang{\mathbf{v},\rho(g) \mathbf{a}}| \gtrsim \frac{d}{\sqrt{\log d}} |\mathbf{v}|,\]
where the last inequality is \cref{lem:sup-inequality}. Furthermore, by Parseval,
\[\|x\|_{L^2(G)} = \sqrt{d}\norm{\widehat{x}(\rho)}_\mathrm{HS} = \sqrt{d}\snorm{\mathbf{a}\mathbf{v}^\dagger}_\mathrm{HS} = \sqrt{d}|\mathbf{v}|.\]
Since $\abs{G} = 2^dd!$, we have $d = (1+o(1))\log{\abs{G}}/\log\log{\abs{G}}$, which completes the proof.
\end{proof}

\subsection{Unweighted construction}\label{subsec:unweighted}

Let us first explain the setup for this entire subsection.
Let $G$ be any finite group (later on we will specialize to $G = S_d \ltimes (\mathbb Z/2\mathbb Z)^d$).
Let $\rho \in \widehat G$ be a real irreducible representation of $G$ of dimension $d = d_\rho$, i.e., $\rho \colon G \to O(d)$ is a homomorphism.
Finally, we assume that $\sqrt{\abs{G}/\log\abs{G}} > 15 d$.

Fix a unit vector $\mathbf{a}\in\mathbb R^d$ and let
\begin{equation}\label{eq:f}
f(g) = \frac{1 - \mathbf{a}^\intercal\rho(g)\mathbf{a}}{2}.
\end{equation}
By Cauchy--Schwarz, $f(g)\in [0,1]$. Furthermore, $f(g^{-1}) = f(g)$ since $\rho(g)$ has real entries.

Note that $f$ is quite similar to the example given in the proof of \cref{thm:main-signed-weighted}, but shifted and scaled so that its values lie in $[0,1]$. The idea is to sample a random Cayley graph from $f$. Then its eigenvalues will be close to the original. Furthermore, we will show that the top nontrivial eigenspace (which corresponds to $\rho$) does not change much, so the estimate \cref{lem:sup-inequality} will remain valid.

We now sample a random function $h$ based on $f$. Let $G'$ be the set of elements $g\in G$ with $g = g^{-1}$ and $G''$ be a subset of $G\setminus G'$ containing exactly one element of each set $\{g,g^{-1}\}\in\binom{G}{2}$ such that $g\neq g^{-1}$. For $g\in G'$, let $h(g)$ be $1$ with probability $f(g)$ and zero otherwise. For $g \in G''$, let $h(g) = h(g^{-1}) = 1$ with probability $f(g)$ and $0$ otherwise. The choices are independent across $G'\cup G''$. Note that $f(e) = 0$, so $h(e) = 0$.

For each $g \in G$, let $P_g$ denote the matrix with columns and columns indexed by $G \times G$ with entry $1/\abs{G}$ at position $(gx,x)$ for each $x \in G$ and zero elsewhere.
Viewing $M_f$ and $M_h$ as matrices (as described in \cref{subsec:eigendecomposition}), we have
\begin{align*}
M_h &= \sum_{g\in G'}h(g)P_g + \sum_{g\in G''}h(g)(P_g+P_{g^{-1}})\\
&= \sum_{g\in G'}(h(g)-f(g))P_g + \sum_{g\in G''}(h(g)-f(g))(P_g + P_{g^{-1}}) + \sum_{g\in G} f(g)P_g.
\end{align*}
We first compute the spectrum of $\mathbb E[M_h] = M_f$.
\begin{lemma}\label{lem:spectrum}
Let $h$ be as above. The spectrum of $\mathbb{E}[M_h]$ is $1/2$ with multiplicity $1$, $-1/(2d)$ with multiplicity $d$, and $0$ with multiplicity $\abs{G}-d-1$.
\end{lemma}
\begin{proof}
By linearity of expectation, $\mathbb E[M_h] = M_f$. Furthermore, since
\[f(g) = \frac{1 - \mathbf{a}^\intercal\rho(g)\mathbf{a}}{2} = \frac{1}{2} - \frac{1}{2d}(d\sang{\rho(g),\mathbf{a}\mathbf{a}^\intercal}_\mathrm{HS}),\]
we see that $\widehat{f}(\operatorname{triv}_G) = 1/2$ and $\widehat{f}(\rho) = -\mathbf{a}\mathbf{a}^\intercal/(2d)$ by Fourier inversion, with $\widehat{f}$ only supported at these two representations (here $\operatorname{triv}_G$ is the trivial representation of $G$).

The analysis in \cref{subsec:eigendecomposition} therefore shows that $M_f$ has eigenvalues $1/2$ with multiplicity $1$, $-1/(2d)$ with multiplicity $d$, and $0$ for the rest.
\end{proof}

In order to establish quantitative concentration bounds regarding our sampling, we use the matrix Hoeffding inequality by Tropp  \cite{Tro12}. Recall that for self-adjoint $A,B$, the notation $A\preceq B$ means that $B-A$ is positive semidefinite.
\begin{theorem}[{\cite[Theorem~1.3]{Tro12}}]\label{thm:Hoeff}
Consider a finite sequence $\{ \mathbf{X}_k \}$ of independent, random, self-adjoint matrices with dimension $d$, and let $\{ \mathbf{A}_k \}$ be a sequence of fixed self-adjoint matrices.  Assume that each random matrix satisfies
\[
\mathbb{E} \mathbf{X}_k = \mathbf{0}
\quad\text{and}\quad
\mathbf{X}_k^2 \preceq \mathbf{A}_k^2
\quad\text{almost surely}.
\]
Then, for all $t \geq 0$,
\[
\mathbb{P}\bigg({ \lambda_{\max}\left( \sum_k \mathbf{X}_k \right) \geq t \bigg)}
	\leq d \cdot e^{-t^2 / (8\sigma^2) }
	\quad\text{where}\quad
	\sigma^2 := \norm{ \sum_k \mathbf{A}_k^2 }_{\operatorname{op}}.
\]
\end{theorem}
\begin{remark}
The constant $8$ can be replaced by $2$ if $\mathbf{X}_k$ and $\mathbf{A}_k$ commute almost surely, which will hold true in our application. See \cite[Remark~7.4]{Tro12}.
\end{remark}
\begin{lemma}\label{lem:norm1}
Let $h$ be as above. Then
\[\mathbb{P}\left[\norm{M_h-\mathbb E[M_h]}_{\operatorname{op}}\le 4\sqrt{\frac{\log(6\abs{G})}{\abs{G}}}\right]\ge \frac23.\]
\end{lemma}
\begin{proof}
Note that when $g = g^{-1}$ we have that $P_g^2 = I/\abs{G}^2$. Otherwise note that
\[(P_g + P_{g^{-1}})^2 = 2I/\abs{G}^2 + P_{g^2} + P_{g^{-2}} \preceq 4I/\abs{G}^2\]
as
\[-2I/\abs{G}^2 + P_{g^2} + P_{g^{-2}} = (P_g - P_{g^{-1}})^2\preceq \mathbf{0}.\]
Here we are using that $P_g-P_{g^{-1}}$ is antisymmetric.

Using that $|h(g)-f(g)|\le 1$ almost surely, and applying \cref{thm:Hoeff} to
\[M_h - \mathbb E[M_h] = \sum_{g\in G'}(h(g)-f(g))P_g + \sum_{g\in G''}(h(g)-f(g))(P_g + P_{g^{-1}})\]
we find that
\[\mathbb{P}\bigg(\lambda_{\max}\big(M_h-\mathbb E[M_h]\big)\ge t\bigg)\le \abs{G}\exp\bigg(\frac{-t^2\abs{G}}{16}\bigg)\]
for all $t\ge 0$.
Applying the same inequality to $-M_h$ yields
\[\mathbb{P}\bigg(\norm{M_h-\mathbb E[M_h]}_{\operatorname{op}}\ge t\bigg)\le 2\abs{G}\exp\bigg(\frac{-t^2\abs{G}}{16}\bigg).\]
Setting $t = 4\abs{G}^{-1/2}(\log 6\abs{G})^{1/2}$ yields the lemma.
\end{proof}
This allows us to control the spectrum of $M_h$.
\begin{corollary}\label{cor:simple}
With $h$ as above, we have that with probability at least $2/3$ the number of eigenvalues of $M_h$ in $[-1/d,-1/(3d)]$ is exactly $d$.
\end{corollary}
\begin{proof}
This is an immediate consequence of Weyl's inequality on deviation of eigenvalues along with \cref{lem:spectrum,lem:norm1}.

More specifically, we have that $M_h$ and $\mathbb E[M_h]$ are self-adjoint and $\norm{M_h-\mathbb E[M_h]}_{\operatorname{op}}\le 4\sqrt{\log(6\abs{G})/\abs{G}}$ with probability at least $2/3$. Thus, writing $\nu_1\ge\cdots\ge\nu_{\abs{G}}$ for the eigenvalues of $\mathbb E[M_h]$ (which we know to be $1/2,0,\ldots,0,-1/(2d),\ldots,-1/(2d)$ with $d$ copies of $-1/(2d)$ by \cref{lem:spectrum}) and $\mu_1\ge\cdots\ge\mu_{\abs{G}}$ for the eigenvalues of $M_h$, we have
\[
|\mu_j-\nu_j|\le 4\sqrt{\frac{\log(6\abs{G})}{\abs{G}}} \le \frac{1}{6d}
\]
for all $1\le j\le \abs{G}$ by Weyl's inequality.
The final inequality uses the assumption that $\sqrt{\abs{G}/\log \abs{G}} > 15 d$.
\end{proof}
We now show that $\widehat{h}(\rho)$ and $\widehat{f}(\rho) = \mathbb E[\widehat{h}(\rho)]$ are close.
\begin{lemma}\label{lem:norm2}
Let $h$ and $\rho$ be as above. Then
\[\mathbb P\left[ \snorm{\widehat{h}(\rho) - \mathbb{E}[\widehat{h}(\rho)]}_{\operatorname{op}} \le 4\sqrt{\frac{\log (6d)}{\abs{G}}} \right]\ge \frac23.\]
\end{lemma}
\begin{proof}
The proof is essentially identical to the proof of \cref{lem:norm1}. Note that if $g = g^{-1}$ then $\rho(g)^2=I_d$. Otherwise
\[(\rho(g)+\rho(g^{-1}))^2 = 2I_d + \rho(g^2) +  \rho(g^{-2})\preceq 4I_d\]
as
\[(\rho(g)-\rho(g^{-1}))^2 \preceq \mathbf{0}.\]
Here we are using that $\rho(g)-\rho(g^{-1}) = \rho(g)-\rho(g)^\intercal$ is antisymmetric.

Then, using the matrix Hoeffding bound \cref{thm:Hoeff}, it immediately follows that
\[\mathbb{P}\bigg(\norm{\widehat{h}(\rho) - \mathbb E[\widehat{h}(\rho)]}_{\operatorname{op}}\ge t\bigg)\le 2d \exp\bigg(\frac{-t^2\abs{G}}{16}\bigg).\]
Setting $t = 4\abs{G}^{-1/2}(\log 6\abs{G})^{1/2}$ yields the lemma.
\end{proof}

We now show that the top eigenvector of $\widehat{h}(\rho)$ and $\widehat{f}(\rho) = \mathbb{E}[\widehat{h}(\rho)]$ are close.
This is a special case of the Davis--Kahan Theorem \cite{DK70}.
We include a proof (adapted from \cite[Theorem~5.9]{RH19}) for completeness.
Recall that $\widehat{h}(\rho)$ is real so its eigenvectors are real.

\begin{lemma}\label{lem:dk}
Let $h, \rho, \mathbf{a}$ be as above. Let $\mathbf{b}$ be a real unit eigenvector of the top eigenvalue of $\widehat{h}(\rho)$.
With probability at least $2/3$ we have
\[
\min \{|\mathbf{a}+\mathbf{b}|,|\mathbf{a}-\mathbf{b}|\} \le 16\sqrt{2}d\sqrt{\frac{\log (6d)}{\abs{G}}}.
\]
\end{lemma}
\begin{proof}
Let
\[\Sigma = \mathbb{E}[\widehat{h}(\rho)] = \widehat{f}(\rho) = -\frac{\mathbf{a}\mathbf{a}^\intercal}{2d}
\]
and
\[
\Sigma' = \widehat{h}(\rho).
\]
Then we have that
\begin{align*}
\mathbf{a}^\intercal\Sigma\mathbf{a}-\mathbf{b}^\intercal\Sigma\mathbf{b}& = \mathbf{a}^\intercal\Sigma'\mathbf{a}-\mathbf{b}^\intercal\Sigma\mathbf{b} - \mathbf{a}^\intercal(\Sigma'-\Sigma)\mathbf{a}\\
& \le \mathbf{b}^\intercal\Sigma'\mathbf{b}-\mathbf{b}^\intercal\Sigma\mathbf{b} - \mathbf{a}^\intercal(\Sigma'-\Sigma)\mathbf{a}\\
& = \langle \Sigma-\Sigma', \mathbf{a}\mathbf{a}^\intercal-\mathbf{b}\mathbf{b}^\intercal\rangle_\mathrm{HS}\\
& \le \norm{\Sigma'-\Sigma}_{\operatorname{op}}\cdot||\mathbf{a}\mathbf{a}^\intercal-\mathbf{b}\mathbf{b}^\intercal||_{S_1}\\
& \le \sqrt{2}\norm{\Sigma'-\Sigma}_{\operatorname{op}}\cdot\norm{\mathbf{a}\mathbf{a}^\intercal-\mathbf{b}\mathbf{b}^\intercal}_\mathrm{HS}.
\end{align*}
The second inequality is an application of \cref{eq:Hold}, noting that $\norm{\cdot}_{\operatorname{op}} = \norm{\cdot}_{\operatorname{S_\infty}}$. The last step uses that for a matrix $M$ of rank at most 2, one has $\norm{M}_{S_1}\le\sqrt{2}\norm{M}_{S_2} = \sqrt{2}\norm{M}_\mathrm{HS}$.

Furthermore we have
\[\mathbf{a}^\intercal\Sigma\mathbf{a}-\mathbf{b}^\intercal\Sigma\mathbf{b} = \frac{1 - (\mathbf{b}\cdot \mathbf{a})^2}{2d}\]
and
\[\norm{\mathbf{a}\mathbf{a}^\intercal-\mathbf{b}\mathbf{b}^\intercal}_\mathrm{HS}^2 = \operatorname{Tr}((\mathbf{a}\mathbf{a}^\intercal-\mathbf{b}\mathbf{b}^\intercal)^2) = 2 - 2(\mathbf{b}\cdot \mathbf{a})^2.\]
Therefore we have that
\[(1-(\mathbf{b}\cdot \mathbf{a})^2)^{1/2}\le 4d\norm{\Sigma'-\Sigma}_{\operatorname{op}}.\]
Then
\[(\mathbf{a}\cdot\mathbf{b})^2\ge 1 - 16d^2\norm{\Sigma'-\Sigma}_{\operatorname{op}}^2.\]
Negating $\mathbf{b}$ if necessary so that $\mathbf{a} \cdot \mathbf{b} \ge 0$, we have
\[|\mathbf{a}-\mathbf{b}|^2 = 2 - 2(\mathbf{a}\cdot\mathbf{b})\le 2\paren{1-\sqrt{1-16d^2\norm{\Sigma'-\Sigma}_{\operatorname{op}}^2}}\le 32d^2\norm{\Sigma'-\Sigma}_{\operatorname{op}}^2.\]
By \cref{lem:norm2}, with probability at least $3/4$, one has $\snorm{\Sigma'-\Sigma}_{\operatorname{op}}^2  \le 16 \log (6d)/\abs{G}$, and the lemma follows.
\end{proof}
We combine the concentration results derived so far.
\begin{proposition}\label{prop:sampling}
Let $h, \mathbf{a}$ be defined as above. For $\abs{G}$ sufficiently large, we have with probability at least $1/3$ that all of the following hold:
\begin{itemize}
    \item $M_h$ has exactly $d$ eigenvalues in the interval $[-1/d,-1/(3d)]$.
    \item $\widehat{h}(\rho)$ has exactly one eigenvalue $\lambda$ in $[-1/d,-1/(3d)]$.
    \item There is a real unit eigenvector $\mathbf{b}$ of $\widehat{h}(\rho)$ of eigenvalue $\lambda$ with
    \[|\mathbf{a}-\mathbf{b}|\le 16\sqrt{2}d\sqrt{\frac{\log (6d)}{\abs{G}}}.\]
\end{itemize}
\end{proposition}
\begin{proof}
This is an immediate application of \cref{cor:simple,lem:norm2,lem:dk}.
Note that although we are union-bounding over the failures of three statements (with failure rate at most $1/3$ each), the event used in \cref{lem:dk} is precisely that of \cref{lem:norm2}.
\end{proof}
We are now in position to prove \cref{thm:lower}. The proof will mimic that of \cref{thm:main-signed-weighted}.
\begin{proof}[Proof of \cref{thm:lower}]
As in \cref{subsec:weighted},
let $G = S_d\ltimes(\mathbb Z/2\mathbb Z)^d$ and $\rho$ be its standard representation on $\mathbb C^d$ (permuting and negating coordinates), which is easily seen to be real. Furthermore let $\mathbf{a}$ be the unit vector in the direction of $(1,1/\sqrt{2},\ldots,1/\sqrt{d})$, viewed as a column.

We sample $h$ as in the beginning of this subsection (the assumption $\sqrt{\abs{G}/\log\abs{G}} > 15 d$ holds for sufficiently large $d$). Let our graph be the Cayley graph with adjacency matrix $\abs{G}M_h$. As we care only about scale-invariant properties of eigenspaces, we restrict attention to $M_h$, which acts on $V = \mathbb C^G$.

By \cref{prop:sampling}, for $\abs{G}$ large enough, with probability at least $2/3$ there are exactly $d$ eigenvalues of $M_h$ in $[-1/d,-1/(3d)]$, and $\widehat{h}(\rho)$ has one eigenvalue $\lambda$ in this range with a unit eigenvector $\mathbf{b}$ satisfying
\begin{equation}\label{eq:ab}
|\mathbf{a}-\mathbf{b}|\le 16\sqrt{2}d\sqrt{\frac{\log (6d)}{\abs{G}}}.
\end{equation}

By the characterization of eigenspaces of Cayley graphs in \cref{subsec:eigendecomposition}, we see that $\widehat{h}(\rho)$ contributes a $d$-dimensional eigenspace to $M_h$ for each of its eigenvalues. Therefore we see that the $d$ eigenvalues of $M_h$ in $[-1/d,-1/(3d)]$ are precisely $d$ copies of this eigenvalue $\lambda$.

In particular, $M_h$ has an eigenvalue $\lambda$ which has eigenspace precisely $V_{\rho,\mathbf{b}}$, which recall from \cref{eq:Vrhov} is
\[V_{\rho,\mathbf{b}} = \{x\in L^2(G): x(g)=d\sang{\rho(g),\mathbf{b}\mathbf{w}^\dagger}_\mathrm{HS} \text{ for some } \mathbf{w}\in\mathbb C^d\}.\]

Now to show the construction satisfies the conclusion of the theorem. Let $x \in V_{\rho,\mathbf{b}}$.
We wish to show that (recall $\abs{G} = 2^dd!$ so that $d= (1+o(1))\log{\abs{G}}/\log\log{\abs{G}}$)
\[
\norm{x}_{L^\infty(G)} \gtrsim \sqrt{\frac{d}{\log d}} \norm{x}_{L^2(G)}
= (1+o(1))
\frac{\sqrt{\log\abs{G}}}{\log\log\abs{G}} \norm{x}_{L^2(G)}.
\]
If $x(g) = d\ang{\rho(g),\mathbf{b}\mathbf{v}^\dagger}_\mathrm{HS} = d\mathbf{v}^\dagger\rho(g)\mathbf{b}$ for some $\mathbf{v}\in\mathbb C^d$, then by Parseval,
\[\|x\|_{L^2(G)} = \sqrt{d}\snorm{\mathbf{b}\mathbf{v}^\dagger}_\mathrm{HS} = \sqrt{d}|\mathbf{v}|.\]
Furthermore,
\begin{align*}
\|x\|_{L^\infty(G)}
&= \sup_{g\in G}|d\langle\rho(g),\mathbf{b}\mathbf{v}^\dagger\rangle_\mathrm{HS}| \\
&\ge
\sup_{g\in G}|d\langle\rho(g),\mathbf{a}\mathbf{v}^\dagger\rangle_\mathrm{HS}|-\sup_{g\in G}|d\langle\rho(g),(\mathbf{a}-\mathbf{b})\mathbf{v}^\dagger\rangle_\mathrm{HS}|\\
&\gtrsim\frac{d|\mathbf{v}|}{\sqrt{\log d}}-d|\mathbf{a}-\mathbf{b}||\mathbf{v}|
\\
&\gtrsim
\sqrt{\frac{d}{\log d}}\|x\|_{L^2(G)}.
\end{align*}
for sufficiently large $d$, by \cref{lem:sup-inequality} and \cref{eq:ab}.
\end{proof}

\begin{remark}
To produce the graphs in \cref{fig:spectral-drawing}, we produce a Cayley graph on $G = S_d\ltimes(\mathbb Z/2\mathbb Z)^d$ with each possible generator $g\neq e$ included with probability $C(1-f(g))$. ($C = 2/3$ for the first figure and $C = 1/7$ for the second; these constants merely serve to sparsify the graphs for aesthetic purposes.)

In the proof of \cref{thm:lower} above, we sample a graph via a similar procedure and deduce that with positive probability it has an unbounded eigenspace of dimension $d$. In fact, we can further deduce that this unbounded eigenspace has negative eigenvalue, and is the largest eigenvalue in magnitude after the trivial eigenvalue. Thus, a similar proof shows that the graph we sampled above, with positive probability, has an unbounded eigenspace of multiplicity $d\ge 2$ which contains the second and third eigenvalues. Therefore any possible spectral drawing of such a graph will have width at least $c\sqrt{\log\abs{G}}/{\log\log\abs{G}}$, as required.

Finally, in practice, we only sampled the small values $d = 3$ and $d = 4$. In this situation there is a decent probability of sampling a graph not satisfying the desired properties, namely of having the second and third eigenvalues come from the standard representation $\rho$ of $G$, and that their eigenspace is precisely $d$-dimensional. To produce \cref{fig:spectral-drawing}, we check for these properties and resample until they hold.
\end{remark}

\section{Upper Bound}\label{sec:converse}

In this section we prove \cref{thm:upper-cayley,thm:upper-transitive}, showing that all Cayley graphs (\cref{subsec:upper-cayley}) and transitive graphs (\cref{subsec:upper-vertex-transitive}) on $n$ vertices have an $O(\sqrt{\log n})$-bounded orthonormal eigenbasis.

\subsection{Cayley graphs} \label{subsec:upper-cayley}

\begin{lemma}\label{lem:projection}
Given a set $S$ of $n$ unit vectors in $\mathbb{R}^d$ (resp. $\mathbb C^d$) we can find an orthonormal (resp. unitary) basis $L$ of $\mathbb{R}^d$ (resp. $\mathbb C^d$) such that
\[\max_{\mathbf{w}\in L, \mathbf{v}\in S}\abs{\ang{\mathbf{w},\mathbf{v}}}\lesssim \sqrt{\frac{\log (dn)}{d}}.\]
Furthermore, when $S\subseteq\mathbb C^{d}$ we can choose $L$ to have all real vectors.
\end{lemma}
\begin{proof}
Let us first do the real case.
Recall the following standard bound on the volume of spherical caps in high dimensions (e.g., \cite[Lemma~2.2]{Bal97}): for a uniformly random unit vector $\mathbf{w} \in \mathbb R^d$ and fixed unit vector $\mathbf{v} \in \mathbb R^d$, one has
\begin{equation}\label{eq:spherical-cap}
\mathbb P( \ang{\mathbf{w}, \mathbf{v}} \ge \epsilon )
= \mathbb P( \abs{\mathbf{w} - \mathbf{v}}^2 \le  2-2\epsilon )
\le e^{-d \epsilon^2/2}.
\end{equation}

Let $\epsilon = \sqrt{2\log (4dn)/d}$. Then applying union bound with \cref{eq:spherical-cap}, we find that an orthonormal basis $L = \{\mathbf{w}_1,\ldots,\mathbf{w}_d\}$ uniformly at random satisfies
\[
\mathbb P\paren{ \max_{\mathbf{w} \in L, \mathbf{w} \in S}\abs{\ang{\mathbf{w}, \mathbf{v}}} \ge \epsilon } \le 2dn e^{-d\epsilon^2/2} \le \frac12.
\]
So there is some $L$ such that $\ang{\mathbf{w}, \mathbf{v}} < \epsilon \lesssim \sqrt{\log (dn) /d}$ for all $\mathbf{w} \in L$ and $\mathbf{v} \in S$.

For the complex case, for each $v\in S$ write $\mathbf{v} = \mathbf{v}_1 + i \mathbf{v}_2$ for $\mathbf{v}_1,\mathbf{v}_2\in \mathbb{R}^n$. We apply the real case of this lemma to the set
\[S' = \bigg\{\frac{\mathbf{v}_1}{\snorm{\mathbf{v}_1}_2}: \mathbf{v}\in S\bigg\}\cup\bigg\{\frac{\mathbf{v}_2}{\snorm{\mathbf{v}_2}_2}: \mathbf{v}\in S\bigg\}\]
to obtain a basis $L$ of $\mathbb{R}^d\subseteq\mathbb{C}^d$. Then for each $\mathbf{w}\in L$ and $\mathbf{v}\in S$, we have
\[\abs{\ang{\mathbf{w},\mathbf{v}}}\le\abs{\ang{\mathbf{w},\mathbf{v}_1}} + \abs{\ang{\mathbf{w},\mathbf{v}_2}}\le\abs{\ang{\mathbf{w},\frac{\mathbf{v}_1}{\snorm{\mathbf{v}_1}_2}}} + \abs{\ang{\mathbf{w},\frac{\mathbf{v}_2}{\snorm{\mathbf{v}_2}_2}}}\lesssim\sqrt{\frac{\log(dn)}{d}}.\qedhere\]
\end{proof}

Now we are ready to prove \cref{thm:upper-cayley}. In essence our argument amounts to choosing a random unitary basis (via \cref{lem:projection}) for each eigenspace coming from the representation theory of the group $G$ of the Cayley graph. However, in order to choose a \emph{real} orthonormal eigenbasis, we essentially pair up conjugate irreducible representations.
This technicality is unnecessary if we only wish to find a unitary eigenbasis.

\begin{proof}[Proof of \cref{thm:upper-cayley}]
Let $S$ be the symmetric generating set of the Cayley graph and $\mathbbm{1}_S$ be the corresponding indicator function. Recall, from \cref{subsec:eigendecomposition}, the orthogonal decomposition of $V = \mathbb C^G$ as
\begin{equation}\label{eq:V-decomp}
V
=
\bigoplus_{\rho \in \widehat G} V_\rho
=
\bigoplus_{\rho\in\widehat{G}}\bigoplus_{j=1}^{d_\rho}V_{\rho,\mathbf{v}_j^\rho}.
\end{equation}
See \cref{subsec:eigendecomposition} for the definitions of $V_\rho$ and $V_{\rho,\mathbf{v}}$.
Here the vectors $\mathbf{v}_j^\rho$, $j \in [d_\rho]$, form a unitary eigenbasis of $\widehat{\mathbbm{1}_S}(\rho)$ with respective eigenvalues $\lambda_{\rho,j}$.
The eigenspace of $M_{\mathbbm{1}_S}$ corresponding to some eigenvalue $\lambda$ is a direct sum of all components $V_{\rho,\mathbf{v}_j^\rho}$ with $\lambda_{\rho, j} = \lambda$.
Using this decomposition, we shall construct a real-valued unitary eigenbasis for the operator $M_{\mathbbm{1}_S}$ on $V$ as follows:
\begin{itemize}
    \item For each conjugate pair $(\rho, \overline\rho)$ and eigenvector $\mathbf{b}$ of $\widehat{\mathbbm{1}_S}(\rho)$,
    we will find a real-valued unitary basis of $V_{\rho, \mathbf{b}} \oplus V_{\overline\rho, \overline{\mathbf{b}}}$.
    \item For each irreducible representation $\rho \in \widehat G$ such that $\rho$ and $\overline{\rho}$ are isomorphic (such representations are called \emph{self-dual}), we will find a special eigenbasis of $\widehat{\mathbbm{1}_S}(\rho)$, and a specific construction giving a unitary basis of $V_\rho$ that will depend on whether the matrix $Q$ satisfying $\rho Q = Q \overline{\rho}$ is symmetric or antisymmetric.
\end{itemize}
Note that the second case includes $\rho$ which can be realized as a real representation, but not all self-dual representations are of this form (e.g. the two-dimensional irreducible representation of the quaternion group $Q_8$). Furthermore, we will ensure that all the functions $x$ chosen as basis elements above satisfy
\[
\norm{x}_{L^\infty(G)}
\lesssim\sqrt{\log \abs{G}}\norm{x}_{L^2(G)}.
\]

As a model case we consider $\rho \in \widehat G$ a real irreducible representation of dimension $d = d_\rho$, acting on $\mathbb R^d$.
We will not, strictly speaking, need this analysis in the final argument as our treatment of self-dual representations is strictly more general.
Let $\mathbf{b} \in \mathbb R^d$ be a real eigenvector of $\widehat{\mathbbm{1}_S}(\rho)$.
Recall
\[
V_{\rho,\mathbf{b}} = \{x\in L^2(G): x(g) = d\sang{\rho(g),\mathbf{b}\mathbf{w}^\dagger}_\mathrm{HS}\text{ for some }\mathbf{w}\in \mathbb C^d\}.
\]
Similar to in the proof of \cref{thm:lower}, writing $x_{\mathbf{v}}: G\to\mathbb C$ for the function $x_{\mathbf{v}}(g) = d\sang{\rho(g),\mathbf{b}\mathbf{v}^\dagger}_\mathrm{HS}  = d \sang{\rho(g)\mathbf{v},\mathbf{b}}$, we have
\[\|x_{\mathbf{v}}\|_{L^\infty(G)} = d \cdot \sup_{g\in G}|\langle\mathbf{v},\rho(g)\mathbf{b}\rangle|\]
and
\[\|x_{\mathbf{v}}\|_{L^2(G)} = \sqrt{d}|\mathbf{b}||\mathbf{v}| = \sqrt{d}|\mathbf{v}|.\]
By the real version of \cref{lem:projection} applied to $S = \{\rho(g)\mathbf{b}: g\in G\}$, there is an orthonormal basis $L$ of $\mathbb R^d$ such that (note that $d^2\le\abs{G}$)
\[\sup_{\mathbf{v}\in L, g\in G}|\langle\mathbf{v},\rho(g)\mathbf{b}\rangle|\lesssim\sqrt{\frac{\log (d\abs{G})}{d}}
\lesssim \sqrt{\frac{\log \abs{G}}{d}}. \]
Then for each $\mathbf{v}\in L$ we have
\[\|x_{\mathbf{v}}\|_{L^\infty(G)}
\lesssim\sqrt{\log \abs{G}}\|x_{\mathbf{v}}\|_{L^2(G)}.\]
By Parseval's identity, we see that $\{x_{\mathbf{v}}/\sqrt{d} : \mathbf{v}\in L\}$ forms a unitary basis of $V_{\rho,\mathbf{b}}$. Also note that $x_{\mathbf{v}}$ is real-valued for each $\mathbf{v}\in\mathbb R^d$. This completes the case of real $\rho$.

Next, let $(\rho,\overline{\rho})$ be a conjugate pair of irreducible representations with $\rho$ and $\overline{\rho}$ not isomorphic to each other.
Again let $d = d_\rho$.
For each eigenvector $\mathbf{b} \in \mathbb C^d$ of $\widehat{\mathbbm{1}_S}(\rho)$,
by the complex version of \cref{lem:projection},
we find a unitary basis $L$ of $\mathbb C^d$ so that
$\sup_{\mathbf{v} \in L, g \in G} \abs{\ang{\mathbf{v}, \rho(g)\mathbf{b}}} \lesssim \sqrt{(\log \abs{G})/d}$.
Again writing $x_{\mathbf{v}}(g) = d\sang{\rho(g),\mathbf{b}\mathbf{v}^\dagger}$, we find that $\{x_{\mathbf{v}}/\sqrt{d}: \mathbf{v}\in L\}$ is a unitary basis of $V_{\rho,\mathbf{b}}$ and
\[\|x_{\mathbf{v}}\|_{L^\infty(G)}\lesssim\sqrt{\log\abs{G}}\|x_{\mathbf{v}}\|_{L^2(G)}.\]
Likewise, taking conjugates, we see that
$\{\overline{x_{\mathbf{v}}}/\sqrt{d}: \mathbf{v}\in L\}$
is a unitary basis of $V_{\overline \rho, \overline{\mathbf{b}}}$.
Recall that if $M_{\mathbbm{1}_S} x_{\mathbf{v}} = \lambda x_{\mathbf{v}}$
then $M_{\mathbbm{1}_S} \overline{x_{\mathbf{v}}} = \lambda \overline{ x_{\mathbf{v}}}$ as $M_{\mathbbm{1}_S}$ is symmetric and hence $\lambda$ is real.

The collection of $2d$ vectors
\[
y_{\mathbf{v}}^0 = \frac{x_{\mathbf{v}}+\overline{x_{\mathbf{v}}}}{\sqrt{2d}}
\quad \text{and} \quad
y_{\mathbf{v}}^1 = \frac{x_{\mathbf{v}}-\overline{x_{\mathbf{v}}}}{i\sqrt{2d}},
\]
as $\mathbf{v}$ ranges over $L$, forms a real-valued unitary basis of
$V_{\rho,\mathbf{b}} \oplus V_{\overline \rho, \overline{\mathbf{b}}}$.
Furthermore,
\[
\|y_{\mathbf{v}}^0\|_{L^\infty(G)}
\le\sqrt{\frac{2}{d}}\norm{x_{\mathbf{v}}}_{L^\infty(G)}
\lesssim \sqrt{\frac{\log\abs{G}}{d}}\norm{x_{\mathbf{v}}}_{L^2(G)} = \sqrt{\log\abs{G}}\norm{y_{\mathbf{v}}^0}_{L^2(G)}
\]
and similarly for $y_{\mathbf{v}}^1$.
This completes the case of non-self-dual complex irreducible representations.

Finally, let $\rho$ be a self-dual irreducible representation. Again let $d = d_\rho$. Note that $\widehat{\mathbbm{1}_S}(\rho)$ is Hermitian, hence we can choose coordinates on the representation so that it is a real diagonal matrix. Having done so, we now note that $g\mapsto\rho(g)$ and $g\mapsto\overline{\rho(g)}$ are isomorphic representations on the same space, since $\rho$ is self-dual (where complex conjugation is done in the natural way with respect to the coordinates chosen on the space). Hence there is a unitary operator $Q$ so that
\[\rho(g)Q = Q\overline{\rho(g)}\]
for all $g\in G$. Thus
\[\rho(g)Q\overline{Q} = Q\overline{\rho(g)Q} = Q\overline{Q}\rho(g)\]
for all $g\in G$. By Schur's lemma, we deduce that
\[Q\overline{Q} = \omega I\]
for some $\omega\in\mathbb{C}$. Since $Q$ is unitary, $QQ^\dagger = I$ (we use ${}^\dagger$ to denote Hermitian transpose and ${}^\intercal$ for transpose), which yields
\[Q = \omega Q^\intercal = \omega^2 Q.\]
Since $Q$ is invertible, we deduce $\omega^2 = 1$, and hence $\omega\in\{\pm 1\}$.

From $\widehat{\mathbbm{1}_S}(\rho) = \sum_{g \in S} \rho(g)/\abs{G}$ and $\rho(g)Q = Q\overline{\rho(g)}$
we obtain
\[Q^\dagger\widehat{\mathbbm{1}_S}(\rho)Q = \overline{\widehat{\mathbbm{1}_S}(\rho)} = \widehat{\mathbbm{1}_S}(\rho),\]
since $\widehat{\mathbbm{1}_S}(\rho)$ is a real diagonal matrix, as noted earlier. Therefore $Q$ and $\widehat{\mathbbm{1}_S}(\rho)$ commute. Now choose a unitary simultaneous eigenbasis of $Q$ and $\widehat{\mathbbm{1}_S}(\rho)$, which can be done by the spectral theorem as both operators are normal.

We will actually take a specific basis with more structure. First, note that if $\mathbf{b}$ is an eigenvector of $Q$ with eigenvalue $\lambda$ then
\[Q^{-1}\overline{\mathbf{b}} = Q^\dagger\overline{\mathbf{b}} = \overline{Q^T\mathbf{b}} = \omega^{-1}\overline{Q\mathbf{b}} = \omega^{-1}\overline{\lambda \mathbf{b}}.\]
Thus $\overline{\mathbf{b}}$ is an eigenvector of $Q$ with eigenvalue $(\omega^{-1}\overline{\lambda})^{-1} = \omega\lambda$, using $|\lambda| = 1$ since $Q$ is unitary.
Now we break into sub-cases depending on the value of $\omega\in\{\pm 1\}$.

If $\omega = -1$, then we see that our unitary simultaneous eigenbasis of $Q$ and $\widehat{\mathbbm{1}_S}(\rho)$ can be chosen so that if $\mathbf{b}$ is in it, then so is $\overline {\mathbf{b}}$, since $\mathbf{b}$ and $\overline{\mathbf{b}}$ lie in distinct orthogonal eigenspaces of $Q$.
For such an eigenvector $\mathbf{b}$, as earlier we can apply  \cref{lem:projection} to obtain a unitary basis $L$ of $\mathbb C^d$ so that
$\sup_{\mathbf{v} \in L, g \in G} \abs{\ang{\mathbf{v}, \rho(g)\mathbf{b}}} \lesssim \sqrt{(\log \abs{G})/d}$.
Again writing $x_{\mathbf{v}}(g) = d\sang{\rho(g),\mathbf{b}\mathbf{v}^\dagger}$, we find that $\{x_{\mathbf{v}}/\sqrt{d}: \mathbf{v}\in L\}$ is a unitary basis of $V_{\rho,\mathbf{b}}$ and $\|x_{\mathbf{v}}\|_{L^\infty(G)}\lesssim\sqrt{\log\abs{G}}\|x_{\mathbf{v}}\|_{L^2(G)}$.

Note that $\overline{x_{\mathbf{v}}} \in V_{\rho, \overline{\mathbf{b}}}$ since
\[\overline{x_{\mathbf{v}}}(g) =
d\overline{\sang{\rho(g)\mathbf{v},\mathbf{b}}}
= d\sang{\overline{\rho(g)\mathbf{v}},\overline{\mathbf{b}}}
= d\sang{Q^\dagger\rho(g)Q\overline{\mathbf{v}},\overline{\mathbf{b}}}
= d\sang{\rho(g)Q\overline{\mathbf{v}},Q\overline{\mathbf{b}}}
= d\sang{\rho(g)Q\overline{\mathbf{v}}, \omega\lambda\overline{\mathbf{b}}}.\]
This shows that $\overline{V_{\rho, \mathbf{b}}} = V_{\rho, \overline{\mathbf{b}}}$.
Furthermore, as $M_{\mathbbm{1}_S} x_{\mathbf{v}} = \lambda x_{\mathbf{v}}$, we have $M_{\mathbbm{1}_S} \overline{x_{\mathbf{v}}} = \lambda \overline{x_{\mathbf{v}}}$ since $\lambda$ is real.
Then, as $\mathbf{v}$ varies over $L$, the functions
\[
y_{\mathbf{v}}^0 = \frac{x_{\mathbf{v}}+\overline{x_{\mathbf{v}}}}{\sqrt{2d}}
\quad \text{and} \quad
y_{\mathbf{v}}^1 = \frac{x_{\mathbf{v}}-\overline{x_{\mathbf{v}}}}{i\sqrt{2d}}
\]
form a real-valued unitary basis of $V_{\rho, \mathbf{b}} \oplus V_{\rho, \overline{\mathbf{b}}}$. This completes the proof of the case $\omega = -1$.

If $\omega = 1$, then for every eigenvector $\mathbf{b}$ of $Q$ with eigenvalue $\lambda$, $\overline{\mathbf{b}}$ is another eigenvector of $Q$ also with the same eigenvalue $\lambda$.
Thus every eigenspace $U$ of $Q$ satisfies $U = \overline U$.
A $\mathbb C$-vector space $U$ satisfying $U = \overline U$ is always the $\mathbb C$-extension of the $\mathbb R$-vector space $\re U = \{(\re u_1, \dots, \re u_d) : (u_1, \dots, u_d) \in U\}$ (since every $\mathbf{v} \in U$ can be written as $\mathbf{x} + i \mathbf{y}$ with $\mathbf{x} = (\mathbf{v} + \overline{\mathbf{v}})/2$ and $\mathbf{y} = (\mathbf{v} - \overline{\mathbf{v}})/(2i)$ both having real coordinates).
Thus we can choose an orthonormal basis of $\mathbb R^d$ consisting of real-valued eigenvectors $\mathbf{b}$ of $Q$.

Fix such a real eigenvector $\mathbf{b}$ of $Q$.
For any $\mathbf{v} \in \mathbb C^d$, setting
$x_{\mathbf{v}}(g) = d\sang{\rho(g),\mathbf{b}\mathbf{v}^\dagger}$
as before, we have $\overline{x_{\mathbf{v}}} \in V_{\rho, \mathbf{b}}$ since
\[
\overline{x_{\mathbf{v}}}(g)
= d\overline{\sang{\rho(g)\mathbf{v},\mathbf{b}}}
= d \sang{\overline{\rho(g)\mathbf{v}},\mathbf{b}}
= d \sang{Q^\dagger\rho(g)Q\overline{\mathbf{v}},\mathbf{b}}
= d \sang{\rho(g)Q\overline{\mathbf{v}},Q\mathbf{b}}
= d \sang{\rho(g)Q\overline{\mathbf{v}},\lambda \mathbf{b}}.
\]
Thus $\overline{V_{\rho, \mathbf{b}}} = V_{\rho, \mathbf{b}}$, which then must be the $\mathbb C$-extension of the $d$-dimensional $\mathbb R$-vector space $\re V_{\rho, \mathbf{b}}$.

We now apply \cref{lem:projection} to find a unitary basis $L$ of the $d$-dimensional $\mathbb R$-vector space $\{\mathbf{v} \in \mathbb C^d : x_{\mathbf{v}} \in \re V_{\rho, \mathbf{b}} \}$ satisfying
$\sup_{\mathbf{v} \in L, g \in G} \abs{\ang{\mathbf{v}, \rho(g)\mathbf{b}}} \lesssim \sqrt{(\log \abs{G})/d}$. Then $\{x_\mathbf{v}/\sqrt{d} : \mathbf{v}\in L\}$ is a real-valued unitary basis of $V_{\rho, \mathbf{b}}$ with $\|x_{\mathbf{v}}\|_{L^\infty(G)}\lesssim\sqrt{\log\abs{G}}\|x_{\mathbf{v}}\|_{L^2(G)}$.
\end{proof}

\subsection{Vertex-transitive graphs} \label{subsec:upper-vertex-transitive}
We now extend \cref{thm:upper-cayley} to vertex-transitive graphs; the idea is the same as before, except we first lift to a Cayley graph on the automorphism group $G$ of the original. This trick is closely related to the proof of \cite[Theorem~2.2]{CZ17}.
\begin{proof}[Proof of \cref{thm:upper-transitive}]
Let $G$ denote the automorphism group of the given vertex-transitive graph, acting on the vertex-set from the right. Fix a vertex as the root of the graph.
Let $H$ denote the stabilizer of the root. Then the vertices of the graph are given by right cosets $Hg$, $g \in H\backslash G$, with the root corresponding to the trivial coset $H$. Thus $|H\backslash G| = n$.

Let $f \colon H\backslash G \to \mathbb C$ denote the edge-weights from the root to other vertices of the graph. Since $G$ induces automorphisms on the graph, the edgeweight of $(H, Hg)$ equals that of $(Hh, Hgh) = (H, Hgh)$ for all $h \in H$. Hence $f(gh) = f(g)$ for all $g \in G$ and $h \in H$. So we can view $f$ as a function $f\colon G\to\mathbb C$ that is $H$-invariant from both the left and right.

A function on the vertex set is represented as $x \colon H\backslash G \to \mathbb C$, which we will view as a left-$H$-invariant $x \colon G \to \mathbb C$, i.e., $x(hg) = x(g)$ for all $g \in G$ and $h \in H$.

A function $x \colon G \to \mathbb C$ satisfies $x(hg) = x(g)$ for all $g \in G$ and $h \in H$ (i.e., it is left-$H$-invariant)
if and only if
$\widehat x(\rho) = \rho(h)\widehat x(\rho)$ for all $\rho \in \widehat{G}$ and $h \in H$.
The latter condition is equivalent to saying that
the column-space of $\widehat x(\rho)$ lies in $U_\rho$, the $1$-eigenspace of $\rho|_H$:
\[
U_\rho := \{v \in W_\rho: \rho(h) v = v\text{ for all } h \in H\}.
\]
The forward implication follows from the Fourier transform formula $\widehat x(\rho) = \mathbb E_{g \in G} x(g)\rho(g)$,
while the reverse implication follows from the inversion formula $x(g) = \sum_\rho d_\rho \operatorname{tr}(\rho(g)^\dagger \widehat x(\rho))$.

Let $m_\rho = \dim U_\rho$. By counting the dimension of the space of all left-$H$-invariant functions, we obtain
\begin{equation}\label{eq:transitive-dim-count}
\sum_{\rho \in \widehat{G}} d_\rho m_\rho = \abs{H\backslash G} = n.
\end{equation}
Indeed, the condition that $\widehat{x}(\rho)$ has column-space contained within $U_\rho$ restricts $\widehat{x}(\rho)$ to a $d_\rho m_\rho$-dimensional subspace of $\operatorname{End} W_\rho$.

Since $f \colon G \to \mathbb C$ is both left- and right-$H$-invariant, $\widehat{f}(\rho) = \rho(h) \widehat{f}(\rho) \rho(h')$ for all $h,h' \in H$. So $\widehat{f}(\rho)$ leaves $U_\rho$ invariant. Let $v^\rho_1, \dots, v^\rho_{m_\rho} \in U_\rho$ be an eigenbasis of the action of $\widehat{f}(\rho)$ on $U_\rho$.

For each $\rho \in \widehat{G}$, choose a unitary basis $a_1^\rho, \dots, a_{d_\rho}^\rho$ of $W_\rho$, and for each $j \in [d_\rho]$ and $k\in[m_\rho]$, define $x^\rho_{j,k} \colon G \to \mathbb C$ by setting $\widehat {x^\rho_{j,k}}(\rho) = v^\rho_k (a_j^\rho)^\dagger/\sqrt{d_\rho}$ and $\widehat x (\rho') = 0$ for all $\rho' \ne \rho$.

The functions $x^\rho_{j,k}$, with $\rho \in \widehat{G}$, $j \in [d_\rho]$, $k \in [m_\rho]$ satisfy the following properties.
\begin{enumerate}
	\item $x^\rho_{j,k}$ is left-$H$-invariant, i.e., are functions $H\backslash G \to \mathbb C$ (since the columns of $\widehat{x^\rho_{j,k}}$ are in $U_\rho$),
	\item $x^\rho_{j,k}$ is an eigenfunctions of $M_f$ (since $\widehat{f}(\rho)\widehat{x^\rho_{j,k}}(\rho)$ is a scalar multiple of $\widehat{x^\rho_{j,k}}(\rho)$)
	\item The functions $x^\rho_{j,k}$ are pairwise orthogonal and $\snorm{x^\rho_{j,k}}_2 = 1$. Indeed, by Parseval, one has $\sang{x^\rho_{j,k},x^{\rho'}_{j',k'}}_{\mathrm{HS}} = 0$ if $\rho \ne \rho'$, and
	\[
	\sang{x^\rho_{j,k},x^\rho_{j',k'}}
	=
	d_\rho \sang{\widehat{x^\rho_{j,k}}(\rho),\widehat{x^\rho_{j',k'}}(\rho)}_{\mathrm{HS}}  = \sang{a_{j'}^\rho, a_j^\rho} \sang{v_k^\rho, v_{k'}^\rho} = 1_{j=j'} 1_{k=k'}.
	\]
	\item They form a basis of all functions $H\backslash G \to \mathbb C$ (by orthogonality and dimension counting \cref{eq:transitive-dim-count}).
\end{enumerate}
Furthermore, we have for each $\rho$, $j\in [d_\rho]$, and $k\in[m_\rho]$ that
\[
x^\rho_{j,k}(g) = d_\rho \ang{\rho(g), \widehat {x^\rho_{j,k}}(\rho)}_{\mathrm{HS}}
= \sqrt{d_\rho} \ang{\rho(g), v_k^\rho(a_j^\rho)^\dagger}_{\mathrm{HS}} =
\sqrt{d_\rho} \ang{\rho(g)a_j^\rho, v^\rho_k}.
\]

For each fixed $\rho \in \widehat G$, set $S_\rho= \{\rho(g)v_k^\rho: g\in G, k\in[m_\rho]\}$.
Now since $\rho(h)v_k^\rho = v_k^\rho$ for all $k\in[m_\rho]$ (because $M_\rho$ is the $1$-eigenspace of $\rho|_H$), we see that $|S| \le |G/H|m_\rho \le n^2$.
By the complex version of \cref{lem:projection}, there exists a choice of the unitary basis $a_1^\rho, \dots, a_{d_\rho}^\rho$ in the definition of $x^\rho_{j,k}(g)$ earlier so that
\[
\sup_{j\in[d_\rho],k\in[m_\rho]}\sup_{g\in G}|x^\rho_{j,k}(g)|
= \sup_{j\in[d_\rho],k\in[m_\rho]} \sqrt{d_\rho} \ang{\rho(g)a_j^\rho, v^\rho_k}
\lesssim \sqrt{\log n}.
\]
Thus the functions $x^\rho_{j,k}$, ranging over all irreducible representations $\rho$ and indices $j \in [d_\rho]$ and $k \in [m_\rho]$, form a unitary $\sqrt{\log n}$-bounded eigenbasis.

To obtain a real orthonormal eigenbasis, we can repeat the technique in the proof of \cref{thm:upper-cayley} in the previous subsection. We omit the details.
\end{proof}

\section{Small-set expansion in random Cayley graphs}\label{sec:small-set-expansion}

In this section we prove \cref{thm:naor-nonabelian}, extending Naor's theorem~\cite{Nao12} on small-set expansion for random Cayley graphs to nonabelian groups.
Recall the definition of the Schatten $p$-norm $\norm{\cdot}_{S_p}$ from \cref{sec:schatten}.
We state below a Hausdorff--Young inequality for groups, which is standard though we include its short proof (see \cite{Kun58} for a proof for locally compact unimodular groups).

\begin{lemma}[Hausdorff–-Young inequality for groups] \label{lem:hy}
Let $G$ be a finite group and $f \colon G \to \mathbb C$. For any $1 \le p \le 2 \le q \le \infty$ with $1/p + 1/q = 1$, one has
\[
\norm{f}_{S_q} \le \norm{f}_{L^p(G)}.
\]
\end{lemma}

\begin{proof}
By the Riesz–-Thorin interpolation theorem, it suffices to check the inequality for $(p,q) = (2,2)$ and $(1,\infty)$. For $(p,q) = (2,2)$, we have $\|f\|_{S_2} = \|f\|_2$ by Parseval. For $(p,q) = (1,\infty)$ we have
\[
\norm{f}_{S_\infty} = \max_{\rho \in \widehat{G}} \snorm{\widehat{f}(\rho)}_{\operatorname{op}}
= \max_{\rho \in \widehat{G}}\norm{\mathbb{E}_g f(g)\rho(g) }_{\operatorname{op}} \le \mathbb{E}_{g \in G} \abs{f(g)} = \norm{f}_1
\]
as $\norm{\rho(g)}_{\operatorname{op}} =1$ for all $g \in G$.
\end{proof}

\begin{lemma} \label{lem:qform-schatten}
Let $G$ be a finite group. For functions $f,x \colon G \to \mathbb C$ and real $p \ge 1$, one has
\[
\abs{\ang{ x, f \ast x }} \le \norm{f}_{S_p} \norm{x}_{2p/(p+1)}^2.
\]
\end{lemma}

\begin{proof}
For each $\rho \in \widehat{G}$ we have
\begin{align}
\abs{\ang{\widehat x(\rho), \widehat{f}(\rho) \widehat x(\rho) ) }_\mathrm{HS}}
&=
\abs{\Tr \paren{\widehat x(\rho)^\dagger \widehat{f}(\rho) \widehat x(\rho)}}
=
\abs{\Tr \paren{\widehat x(\rho) \widehat x(\rho)^\dagger \widehat{f}(\rho))}} \nonumber
\\
&\le
\snorm{\widehat{f}(\rho)}_{S_p} \snorm{\widehat x(\rho) \widehat x(\rho)^\dagger}_{S_{p/(p-1)}}
=
\snorm{\widehat{f}(\rho)}_{S_p} \snorm{\widehat x(\rho) }_{S_{2p/(p-1)}}^2. \label{eq:qform-holder-step}
\end{align}
Here the inequality step uses the matrix H\"older inequality~\cref{eq:Hold}: $\Tr(AB) \le \norm{A}_{S_p} \norm{B}_{S_{p/(p-1)}}$ for all $p\in[1,\infty]$.
The last step uses that the singular values of a matrix $A$ are the square roots of the singular values of $AA^\dagger$.

Thus, applying the convolution and Parseval identities for the nonabelian Fourier transform (\cref{subsec:fourier}), we have
\begin{align*}
\abs{\ang{ x, f \ast x }}
&= \abs{ \sum_{\rho \in \widehat{G}} d_{\rho} \ang{\widehat x(\rho), \widehat{f}(\rho) \widehat x(\rho) ) }_\mathrm{HS} }
&& \text{\small [Convolution \& Parseval]}
\\
&\le  \sum_{\rho \in \widehat{G}} d_{\rho} \snorm{\widehat{f}(\rho)}_{S_p} \snorm{\widehat x(\rho) }_{S_{2p/(p-1)}}^2 && \text{\small [by \cref{eq:qform-holder-step}]}
\\
&\le \paren{ \sum_\rho d_\rho \snorm{ \widehat{f}(\rho) }_{S_p}^p }^{1/p}
    \paren{ \sum_\rho d_\rho \snorm{ \widehat x(\rho) }_{S_{2p/(p-1)}}^{2p/(p-1)} }^{(p-1)/p}
    &&\text{\small  [H\"older's inequality]}
\\
&= \norm{f}_{S_p} \norm{x}_{S_{2p/(p-1)}}^2 &&\text{\small [by \cref{eq:Sp}]}
\\
&\le \norm{f}_{S_p} \norm{x}_{2p/(p+1)}^2. &&\text{\small [by \cref{lem:hy}]}
\end{align*}
This proves the desired inequality.
\end{proof}

Naor proved the following uniform bound on the Schatten norms of random Cayley graphs via a novel Azuma-type concentration inequality in uniformly smooth normed spaces.

\begin{lemma}[{\cite[Lemma 4.1]{Nao12}}] \label{lem:schatten-concentration}
There exists a universal constant $C > 0$ with the following property.
For any positive integer $k$ and any finite group $G$, if $g_1, \dots, g_k \in G$ are chosen independently and uniformly at random, then, with probability at least $1/2$, the function $f \colon G \to \mathbb R$ given by
\begin{equation}\label{eq:f-sum}
f = \mathbbm{1}_{\{g_1\}} + \mathbbm{1}_{\{g_1^{-1}\}} + \cdots + \mathbbm{1}_{\{g_k\}} + \mathbbm{1}_{\{g_k^{-1}\}} - \frac{2k}{\abs{G}}
\end{equation}
satisfies
\[
\norm{f}_{S_p} \le C \abs{G}^{-1+1/p} \sqrt{pk}
\]
simultaneously for every integer $p \ge 2$.
\end{lemma}

Using this concentration lemma, we can now prove \cref{thm:naor-nonabelian}. Unlike the proof in \cite{Nao12} for abelian groups, we do not need to rely on a bounded eigenbasis.

\begin{proof}[Proof of \cref{thm:naor-nonabelian}]
Let $g_1, \dots, g_k \in G$ be the random group elements generating the Cayley (multi)graph. Define $f \colon G \to \mathbb R$ as in \cref{eq:f-sum}.

Let $X \subseteq G$ with $1 < \abs{X} \le \abs{G}/2$. Define a function $x \colon G \to \mathbb R$ by
\[
x = \abs{G \setminus X} \mathbbm{1}_X - \abs{X} \mathbbm{1}_{G \setminus X}.
\]
It is straightforward to check that
\[
\ang{x, f \ast x} = \frac{2k}{\abs{G}} \abs{X}\abs{G\setminus X} - e(X, G \setminus X).
\]
We also have
\[
\norm{x}_{2p/(p+1)} = \paren{\frac{ \abs{X} \abs{G\setminus X}^{\frac{2p}{p+1}} +   \abs{X}^{\frac{2p}{p+1}} \abs{G \setminus X} }{\abs{G}} }^{\frac{p+1}{2p}}.
\]
Applying the inequality $\abs{\ang{ f \ast x, x }} \le \norm{f}_{S_p} \norm{x}_{2p/(p+1)}^2$ from \cref{lem:qform-schatten}, and with the upper bound $\norm{f}_{S_p} \lesssim \abs{G}^{-1+1/p} \sqrt{pk}$
from \cref{lem:schatten-concentration}, we obtain that with probability at least $1/2$, one has
\[
\abs{\frac{2k}{\abs{G}} \abs{X}\abs{G\setminus X} - e(X, G \setminus X)}
\lesssim \abs{G}^{-1+1/p} \sqrt{pk}
\paren{\frac{ \abs{X} \abs{G\setminus X}^{\frac{2p}{p+1}} +  \abs{X}^{\frac{2p}{p+1}} \abs{G \setminus X}  }{\abs{G}} }^{\frac{p+1}{p}}
\]
simultaneously for all positive integers $p$.
Dividing both sides by $2k \abs{X}\abs{G\setminus X} / \abs{G}$, we obtain
\begin{align*}
\abs{ \frac{e(X, G \setminus X)}{\frac{2k}{\abs{G}} \abs{X}\abs{G\setminus X}}  - 1}
&
\lesssim \abs{G}^{1/p} \sqrt{\frac{p}{k}}
\paren{\frac{ \abs{X}^{\frac{1}{p+1}} \abs{G\setminus X}^{\frac{p}{p+1}} +  \abs{X}^{\frac{p}{p+1}}  \abs{G \setminus X}^{\frac{1}{p+1}} }{\abs{G}} }^{\frac{p+1}{p}}
\\
& \lesssim \abs{X}^{1/p} \sqrt{\frac{p}{k}},
\end{align*}
where in the last step we apply the inequality $x^t (1-x)^{1-t} + x^{1-t} (1-x)^t \le x^t + x^{1-t} \le 2x^t$ for $x = \abs{X}/\abs{G} \le 1/2$ and $t = 1/(p+1) \in [0,1/2]$.
Finally, setting $p = \ceil{\log \abs{X}}$, we see the final expression has an upper bound of $O(\sqrt{(\log \abs{X})/k})$.
\end{proof}

Combinatorics (math.CO); Group Theory (math.GR)


On the Number of Order Types in Integer Grids of Small Size

Abstract: Let $\{p_1,\dots,p_n\}$ and $\{q_1,\dots,q_n\}$ be two sets of $n$ labeled points in general position in the plane. We say that these two point sets have the same order type if for every triple of indices $(i,j,k)$, $p_k$ is above the directed line from $p_i$ to $p_j$ if and only if $q_k$ is above the directed line from $q_i$ to $q_j$. In this paper we give the first non-trivial lower bounds on the number of different order types of $n$ points that can be realized in integer grids of polynomial

\section{Introduction}

Let $A$ and $B$ be two arrays of $n$  distinct numbers.
We say that $A$ and $B$ have the same order type
if for every pair $i,j$ of different indices we have that  $A[i] < A[j]$ if and only if
$B[i] < B[j]$. Goodman and Pollack~\cite{multidimSorting} introduced a higher dimensional analogue of this idea.
Let $S:=\{p_1,\dots,p_n\}$ be a set of $n$ labeled points in general position in the plane.
The relationship that $A[i] < A[j]$ is equivalent to $A[i]$ being the left of $A[j]$ in the real line.
This left-right relationship can be generalized to point sets as follows. For a given triple
$(i,j,k)$ of distinct indices, $p_k$ may be above or below
the directed line from $p_i$ to $p_j$. Two sets of $n$ labeled points
in the plane have the same \emph{order type} if they have these same above-below relationships.\footnote{In the literature, it is more common to consider two points sets as having the same
order type if there is a bijection between them that preserves these above-below
relationships. In this paper we only consider \emph{labeled} order types;
thus, a relabeling of $S$ usually produces a different order type.}
In dimension $d>2$ this
is generalized by considering all $(d+1)$ tuples of points of a given labeled point set in $\mathbb{R}^d$.
The first $d$ points of the tuple define an oriented hyperplane and the relationship is whether
the last point is above or below this hyperplane. The order type is defined
also for point sets not in general position. In this case the last point can be
below, above or on the corresponding hyperplane.

Suppose that for each $A[i]$ we are given the number of elements of $A$ that
are to the left of $A[i]$, from this information alone we can sort $A$
and recover the left-right relationships mentioned above. Remarkably, this also holds
for higher dimensions. For every pair of indices $i$ and $j$, let $\lambda(i,j)$ be
the number of elements of $S$ above the directed line from $i$ to $j$. The \emph{$\lambda$-matrix}
of $S$ is the $n\times n$ matrix whose $(i,j)$ entry is equal to $\lambda(i,j)$. Goodman
and Pollack~\cite{multidimSorting} showed that from the $\lambda$-matrix of a point
set one can recover the above-below relationships of its triples. This also holds
in dimension $d>2$: if for a given $n$-point set in $\mathbb{R}^d$, one is given the number of points above the oriented
hyperplane defined by every $d$-tuple of points, one can recover which
points are above which oriented hyperplanes.

The $\lambda$-matrix of  set of $n$ points in the plane can be codified with
$O(n^2 \log n)$ bits. This implies that if $f(n)$ is the number
of different possible order types of a set of $n$ points in general position in the plane
then $f(n) \le \exp(O(n^2 \log n))$. Goodman and Pollack~\cite{upper}
showed that this bound is far away from the real value of $f(n)$. They showed that
 \[f(n) \le \exp(4(1+O(1/\log n))n \log n).\]
To lower bound $f(n)$, consider the following procedure (see~\cite{upper}). Suppose that
we want to extend $S$ to an $(n+1)$ point configuration
by adding a point $p_{n+1}$ to $S$.
Consider the line arrangement spanned by all the straight
lines passing through a pair of points in $S$.
It was proved by Zaslavsky~\cite{number_of_cells}  that this line arrangement has
\[\binom{\binom{n}{2}}{2}+\binom{\binom{n}{2}}{1}+1-n\binom{n-2}{2}\ge \frac{1}{8}n^4,\]
cells. Adding $p_{n+1}$ in different cells of the arrangement produces point sets with
different order types. We may use this argument by starting from $\{p_1, p_2, p_3\}$
and iteratively adding the remaining points; at each step we consider the number of different options
that produce different order types. This yields
\[f(n)\ge \prod_{i=1}^n \frac{1}{8}i^4 = \frac{n!^4}{8^n}=\exp(4(1+O(1/\log n))n \log n),\]
were the last term is obtained by using Stirling's formula.

The order type of a point configuration abstracts the convexity relationships between
its subsets.
As a result, for various questions regarding point sets, two point sets having the same
order type are equivalent. However, an arbitrary assignment of ``above'' or ``below''
relationships to triples of indices in $\{1,\dots,n\}$ might not be realizable as the order type
of a labeled set of $n$ points.

Aichholzer, Aurenhammer and Krasser~\cite{database} have produced a database with a point set
for each realizable order type of at most $10$ points. Although it is a relatively small value
of $n$, this database has proven to be very useful.
Chazelle asked in 1987 (see~\cite{exponential}): what is the number of bits needed to store a representative
of any given realizable order type of $n$ points? Equivalently, what is the minimum size of an integer grid, so that
it contains a representative of every realizable order type of $n$ points?
Goodman, Pollack and Sturmfels~\cite{exponential,intrinsicSpread} showed that
there are order types of $n$ points whose every realization with positive integer coordinates has a coordinate
of size greater than  $2^{2^{c_{1}n}}$, for some positive constant $c_1$; they also showed that every order type of $n$ points
can be realized with positive integer coordinates of size at most $2^{2^{c_{2}n}}$, for some positive
constant $c_2$.
In the book ``Research Problems in Discrete Geometry''~\cite{research_problems}
by Brass, Moser and Pach, we find the following problem.
\begin{problem}\label{prb:nk}
 For a given constant $\alpha > 0$, what is the number of order types of $n$ points that can be
 represented by integer coordinates smaller than $n^{\alpha}$?
\end{problem}

In this paper we show the first non trivial lower bounds for Problem~\ref{prb:nk}. Let
$g(n,\alpha)$ be the number of different order types realizable in an integer grid
of size $n^{\alpha}$.

For starters one may ask what is the smallest integer grid in which at least
one order type is realizable. This is equivalent to ask what is the size
of the minimum integer grid so that it contains a set of $n$ points
such that no three of them are collinear. This is known as the \emph{no-three-in-a-line problem}
and was introduced by Dudeny~\cite{no_three} in 1917.

\begin{figure}
\begin{center}
\includegraphics[width=0.5\textwidth]{figs/Q_13.pdf}
\end{center}
\caption{$Q_{13}$}\label{fig:Q}
\end{figure}

Erd\H{o}s
showed (see~\cite{roth}) that if $p$ is a prime then the set \[Q_p:=\{(i, i^2 \mod p): 0 \le i < p \}\]
is in general position. This point set is shown in Figure~\ref{fig:Q} for $p=13$. Therefore, at least one order type can be realized
in integer grids of linear size.

Suppose that $n^{\alpha}$ is such that at least one order type of $n$ points
can be realized in an $n^{\alpha} \times n^{\alpha}$ integer grid. Any permutation of the labels of a point set that
preserves the order type must preserve the clockwise cyclic order of the points in the convex hull.
Moreover, for every point $p \in S$, the clockwise cyclic order by angle
of the points of $S \setminus \{p\}$ around $p$, must be also be preserved. These two observations together
imply that at least $(n-1)!$ other
different order types are realizable in this grid. By Stirling's approximation,  this at least
\[\exp(n \log n-n+O(\log n)).\] As a result we consider a meaningful lower bound for $g(n,\alpha)$
to be of \[\exp(c\cdot n \log n)\]
for some $c>1$. In this paper, in Section~\ref{sec:cons}, we prove the following lower bounds.

\begin{theorem}\label{thm:a2}
 If $\alpha >2$  then \[g(n,\alpha) \ge \exp\left( 2n \log n-O(n\log \log n)\right). \]
\end{theorem}

\begin{theorem}\label{thm:a2.5}
 If $\alpha \ge 2.5$ then \[g(n,\alpha) \ge \exp(3n \log n-O(n \log \log n)). \]
\end{theorem}

We have the following upper bounds.
Note that there are at most $n^{2n}=\exp(2n\log n)$
different sets of $n$ points in an $n \times n$ integer grid.
Thus \[g(n,1) \le \exp(2n \log n).\]
By using the point sets found in~\cite{exponential}, one can produce many point sets whose order types
cannot be realized in an integer grid of size $n^{\alpha}.$ Let $P$ be a point set of  $\log \left (  \alpha \log n \right )$
points whose order type cannot be realized with integer coordinates smaller than $n^\alpha$.
Consider $P \cup Q$,  where $Q$ is any point set of $n- \log \left (  \alpha \log n \right )$
points such that $P \cup Q$ is in general position; note that $P \cup Q$ cannot be realized with integer coordinates smaller than $n^\alpha$.
Therefore, for every $\alpha >0$, there are at least
\[f\left (n-\frac{\log \left ( \alpha \log n \right )}{c_1} \right)\]
realizable order types of $n$ points but not realizable in integer grids of size $n^\alpha$.

\section{Lower Bound Constructions}\label{sec:cons}

In this section we prove Theorems~\ref{thm:a2} and~\ref{thm:a2.5}; we present two constructions
that produce many point sets with different order types
in integer grids of size $n^{\alpha}$ for $\alpha >2$ and $\alpha \ge 2.5$, respectively. Our approach is similar to the one used
to lower bound $f(n)$: we iteratively place points and lower bound the number of different
available choices that produce different
order types. With the caveat that if we now consider the line arrangement spanned by the straight
lines passing through pairs of already placed points, a given cell might not contain a grid point.

To work around this problem, we do the following.
We place a portion of our points in a special configuration $\mathcal{C}$; and choose a set of straight lines
passing through pairs of points in $\mathcal{C}$. Then, we define a set $T$ of isothethic squares of side length  equal to $\ell$
such that any two squares are separated by one of our chosen lines. Afterwards, we  place the remaining points.
This is done as follows. At each step we first choose a square  from $T$ that
\begin{itemize}
 \item[$(1)$]  has not been chosen before; and
 \item[$(2)$]  contains a point $p$ of integer coordinates that does not produce
 a triple of collinear points with the previously placed points.
\end{itemize}
We then choose $p$ as our  next point.

Our strategy is to lower bound, at each step, the number of squares in $T$ that satisfy $(1)$ and $(2)$.
We say that these squares are \emph{alive}; otherwise, we say that they are \emph{dead}.
Suppose that a square of $T$
that has not been chosen yet. If less than $\ell$
lines passing through a pair of previously placed points intersect this square, then
it is still alive. In what follows, we use this observation extensively.

\subsection{Cross Configuration}

Let $n$ be an arbitrarily large positive integer and let $p$ be the smallest prime greater than $n/ 4\log n$.
 In this case the configuration
$\mathcal{C}$ consists of four sets $\mathcal{U}$, $\mathcal{L}$, $\mathcal{R}$ and $\mathcal{D}$; each set is an affine copy of $Q_p$.
$\mathcal{L}$ and $\mathcal{R}$ are rotated by $\ang{90}$ and stretched vertically. $\mathcal{U}$ and $\mathcal{D}$ are stretched horizontally.
$\mathcal{L}$ and $\mathcal{R}$ are placed at the same height, with $\mathcal{L}$ to the left of $\mathcal{R}$;
$\mathcal{U}$ and $\mathcal{D}$ are placed
at the same $x$-coordinate and between $\mathcal{L}$ and $\mathcal{R}$; $\mathcal{U}$ is above $\mathcal{L}\cup \mathcal{R} \cup \mathcal{D}$
and $\mathcal{D}$ is below $\mathcal{L}\cup \mathcal{R} \cup \mathcal{U}$.
Every point in $\mathcal{U}$ is joined with a straight line
with the point in $\mathcal{D}$ with the same $x$-coordinate;
every point in $\mathcal{L}$ is joined with a straight line
with the point in $\mathcal{R}$ with the same $y$-coordinate. These
are our chosen set of lines. See Figure~\ref{fig:grid}.
Let $k:=\lceil \log n \rceil$. The precise definitions are
\begin{align}
  \mathcal{U} & := \{(i\cdot 34p\cdot k^2, (34\cdot (i^2 \mod p))\cdot k^2): 0 \le i < p\}, \nonumber \\
  \mathcal{L} & := \{((34\cdot (i^2 \mod p)-136p^2) \cdot k^2, (i\cdot 68p-238p^2)\cdot k^2): 0 \le i < p\}, \nonumber \\
  \mathcal{R} & :=  \{((34\cdot (i^2 \mod p)+153p^2) \cdot k^2, (i\cdot 68p-238p^2)\cdot k^2): 0 \le i < p\}, \nonumber \\
  \mathcal{D} & := \{(i\cdot 34p\cdot k^2, (34\cdot (i^2 \mod p)-408p^2)\cdot k^2): 1 \le 0 < p\} \textrm{ and } \nonumber \\
  \mathcal{C} & :=\mathcal{U} \cup \mathcal{L} \cup \mathcal{R} \cup \mathcal{D}. \nonumber
\end{align}

\begin{figure}
\begin{center}
\includegraphics[width=0.5\textwidth]{figs/W.pdf}
\end{center}
\caption{Cross configuration for $p=5$}\label{fig:grid}
\label{fig:T}
\end{figure}

Simple (but tedious) arithmetic shows that $\mathcal{C}$ is in general position.
The set of chosen straight lines form a rectangular grid.  In the interior of each of these rectangles place an isothethic square
with $32pk^2 \times 32pk^2$ integer grid points.
Let $T$ be the set of these squares.
Baker, Harman and Pintz \cite{primegaps} showed that the interval $[x, x+x^{21/40}]$ contains a prime number, for $x$ sufficiently large. Thus,
$p = n/4 \log n + O(n^{21/40})$. Therefore $|\mathcal{C}|=n/\log n+ O(n^{21/40})$, $|T|=(p-1)^2$ and $\ell=32pk^2$ for this construction.

We now iteratively place the remaining $n-4p$ points. At each stage the number of lines passing through a pair of the so far placed
points is less than $n^2/2$; each of these lines intersects
less than $2p$ squares of $T$; each square must touched by at least
$32pk^2$ straight lines before being dead. Therefore, the number of alive squares at every stage
is at least
\[(p-1)^2-\frac{n^2p}{32pk^2}=\frac{1}{2}p^2-O(p) \ge \frac{n^2}{32 \log^2 n}.\]
where the last inequality holds for sufficiently large $n$.

Therefore, we obtain at least
\[\prod_{i=1}^{n-4p} \frac{n^2}{32 \log^2 n}=\frac{n^{2(n-4p)}}{(32 \log^2 n)^{n-4p}}=\exp\left( 2n \log n-O(n\log \log n)\right)\]
different order types with this procedure.
Since $\mathcal{C}$ is contained in an integer grid of side length equal to $\Theta(p^2 k^2)=\Theta(n^2)$, this proves Theorem~\ref{thm:a2}.

\subsection{Regular Polygon Configuration}
Let $n$ be an arbitrarily large positive integer; let $m$ be the smallest multiple of $16$ larger than $n/\log n$ and let $L:=\lceil 64 n^2/m^{1/2}\rceil$.
Let $\mathcal{C}:=\{v_0,\dots, v_{m-1}\}$ be the vertices, in clockwise order,
of a regular polygon $P$ of side length equal to $L$. These points may not have integer coordinates; their coordinates
will be rounded up to the nearest integer later on.
Let $q^*$ be the center of this polygon. For $1 \le i \le m$,  let $\triangle_i$ be the triangle with vertices
$v_{i-1}, v_{i},$ and  $q^*$. In what follows we define a set $T_i$ of squares
inside $\triangle_i$.

\begin{figure}[h]
	\begin{center}
		\includegraphics[width=0.75\textwidth]{figs/cons4.pdf}
	\end{center}
	\caption{The regular polygon construction with $m=32$}\label{fig:construction}
\end{figure}

Starting at the line segment joining $v_{i-1}$ and $v_{i}$,
let $e_1,\dots,e_{m-1}$ be the line segments joining $v_{i-1}$ and every other vertex of $P$, sorted clockwise by angle around $v_{i-1}$.
Starting at the line segment joining $v_{i}$ and $v_{i-1}$,
let $f_1,\dots,f_{m-1}$ be the line segments joining $v_i$ and every other vertex of $P$, sorted counterclockwise by angle around $v_i$.
Let $C_1$ be the the circumcircle of $P$. Since
every pair of consecutive vertices of $P$ defines a chord of
$C_1$, and these chords have the same length, the angle between any two consecutive $e_j$ and $e_{j+1}$
is the same. Let $\gamma$ be this angle. Moreover, the angle between any two consecutive $f_j$ and $f_{j+1}$ is also equal to $\gamma$; note that
 \[\gamma=\frac{1}{m}\pi.\] For  indices $2 \le j \le m/2$ and $2 \le k \le m/2$, let $p_{j,k}$ be the intersection of $e_j$ and $f_k$;
 note that $p_{j,k}$ is contained in $\Delta_i$.
 Let \[Q:=\left \{p_{j,k}: j,k \textrm{ even and } \frac{m}{8} \le j,k < \frac{m}{4} \right \}.\] Note
 that \[|Q| = \frac{m^2}{256}.\]See Figure~\ref{fig:construction}.
 For each $p_{j,k}$ in $Q$, place an isothethic square
of side length equal to
\[\ell:=\frac{L}{m}\]
centered at $p_{j,k}$.  Let $T_i$ be the set of these squares.
The next lemma shows that the squares in $T_i$ are well separated by the $e_j$'s and $f_k$'s

\begin{figure}[ht]
	\begin{center}
		\includegraphics[page=1, width=.5\textwidth]{figs/zoom.pdf}
	\end{center}
	\caption{The proof of Lemma \ref{lem:separated}}\label{fig:zoom1}
\end{figure}

\begin{lemma}\label{lem:separated}
Let $p_{j,k}$ be a point in $Q$. Then the distances from $p_{j,k}$ to $e_{j-1}$, $e_{j+1}$, $f_{k-1}$ and $f_{k+1}$
 are greater than
 \[\left (\sqrt{2}-1 \right )\pi \ell+O \left ( \frac{\ell}{m^2} \right ).\]
\end{lemma}
\begin{proof}
 We show that the distances from $p_{j,k}$ to $e_{j-1}$ and $e_{j+1}$ are at least the required value.
 The proof for $f_{k-1}$ and $f_{k+1}$ is similar. Note that among the $p_{j,k}$'s in $Q$,
 \[p:=p_{m/8,  m/4-1}\] is the point
 closest to $v_{i}$. Consider the triangle with vertices $v_{i}, v_{i-1}$ and $p$ (see Figure \ref{fig:zoom1}). By the law
 of sines the distance from $p$ to $v_{i}$ is equal to
 \[\frac{\sin(\pi/8)}{\sin(5\pi/8+\pi/m)}L > \frac{\sin(\pi/8)}{\sin(5\pi/8)}L= \left (\sqrt{2}-1 \right )L.\]
 Therefore, the distances from $p_{j,k}$ to $e_{j-1}$ and $e_{j+1}$ are at least
 $\tan(\gamma) \cdot (\sqrt{2}-1)L$. The result follows from the facts that Maclaurin series
 of $\tan(x)$ is equal to $x+O(x^3)$ and that $\gamma=\pi/m$.
\end{proof}

We are ready to define the set of squares, let \[T:=\bigcup_{i=1}^m T_i.\] Let $C_2$ be the circle with center $q^*$ and passing through
$p_{m/4, m/4}$. Note that $T$ is contained in the
annulus $A$ bounded by $C_1$ and $C_2$.
The following lemma upper bounds the number of squares in $T$ that a given straight line can intersect.

\begin{figure}[ht]
	\begin{center}
		\includegraphics[page=2, width=.5\textwidth]{figs/zoom.pdf}
	\end{center}
	\caption{The proof of Lemma \ref{lem:squaresIntersected}}\label{fig:zoom2}
\end{figure}

\begin{lemma}\label{lem:squaresIntersected}
 Every straight line intersects at most
 \[\frac{m^{3/2}}{4}\]
 squares of $T$.
\end{lemma}
\begin{proof}
Let $\varphi$ be a straight line. Note that $\varphi$ intersects $A$ in at most two straight line segments. We upper bound
the number of squares in $T$ that a straight line segment $s$ can intersect.
Each time $s$ intersects a square in  $T_i$, it must intersect and edge
$e_j$ or $f_k$; moreover, only half of these edges define a square in $T_i$. Therefore,  $s$ intersects at most $\frac{m}{8}$ squares in  $T_i$.
We upper bound the number of the triangles $\triangle_i$'s that $s$ can
intersect. For this we upper bound the length of $s$.

Let $R$ and $r$ be the radius of the circles $C_1$ and $C_2$, respectively.
Note that $s$ has maximum length when it is tangent to $C_2$ and its endpoints are in $C_1$.
Therefore,
\[||s||\le 2 \sqrt{R^2-r^2}.\]
Since $C_2$ passes
through $p_{m/4, m/4}$, the distance from $C_2$ to the edge $v_i,v_{i-1}$
is equal to $L/2$. Since $P$ is a regular polygon $R=\frac{1}{2}L \csc(\pi/m)$ and its apotheme
is equal to $R \cos (\pi /m)$ (see Figure \ref{fig:zoom2}). This implies that $r = \frac{1}{2}L(\cot(\pi/m)-1)$.
Therefore,  \[||s||\le 2 \sqrt{R^2-r^2} \le  \sqrt{2}\cdot L\sqrt{\cot \left  (\frac{\pi}{m}\right ) } \le \sqrt{\frac{2m}{\pi}}L-O\left (\frac{L}{m^{3/2}}\right );\]
the last term comes from the fact that the Maclaurin series of $\sqrt{\cot(x)}$ is equal to $\sqrt{\frac{1}{x}}-O(x^{3/2})$.

Now we lower bound the length of $s\cap \triangle_i$.
Note that $s\cap \triangle_i$ has minimum length when $s$ is tangent to $C_2$ and parallel to the edge $v_{i-1},v_{i}$.
Thus,
\[||s\cap \triangle_i||\ge 2 \tan \left (\frac{\pi}{m} \right )r=\left ( 1-\tan \left (\frac{\pi}{m} \right)\right)L > \sqrt{\frac{2}{\pi}}L,\]
where the last term holds for sufficiently large $n$.
Therefore, $s$ intersects a most
$\sqrt{m}$ of the triangles $\triangle_i$. The result follows.
\end{proof}

To end the construction we round the coordinates of the $v_i$'s to their nearest integer. Redefine
the $e_j$'s and $f_k$'s accordingly. By Lemma~\ref{lem:separated}, a square in $T_i$ centered at $p_{j,k}$
is separated from  edges $e_{j'}$ and $f_{k'}$ different $e_j$ and $f_k$ by a distance of at least
$\left (\sqrt{2}-1 \right ) \pi \ell$. The endpoints of the new $e_j$'s and $f_k$'s are
at a distance of at most one of their original positions. Since $\left (\sqrt{2}-1 \right )\pi > 1$,
the squares in $T_i$ are still separated by the straight lines containing the $e_j$'s and $f_k$'s.

We now iteratively place  the remaining $n-m$ points. At every stage the number of lines passing
through every pair of the so far placed points is less than $n^2/2$; each of these lines intersects
at most $m^{3/2}/4$ squares of $T$; each square must be touched by at least $\ell=L/m$ straight lines before
being dead. Thus, the number of squares alive at every stage is at least
\[\frac{m^3}{256}-\frac{n^2m^{5/2}}{8L} \ge \frac{m^3}{512} \ge \frac{n^3}{512 \log^3 n}.\]
Therefore, we obtain at least
\[\prod_{i=1}^{n-m} \frac{n^3}{512 \log^3 n}=\frac{n^{3(n-m)}}{(512 \log n)^{3(n-m)}}=\exp(3n \log n-O(n \log \log n))\]
different order types with this procedure.
Recall that $m \le n / \log n+16$ and $L \le 64 n^2/m^{1/2}+1$.
Therefore, these point sets lie in an
integer grid of side length equal to $L\cdot m =\Theta \left (n^{2.5}/\sqrt{\log n} \right )$. This proves Theorem~\ref{thm:a2.5}.

\textbf{Acknowledgments.}
This work was initiated at the \emph{Third Workshop on Geometry and Graphs}, held at the Bellairs
Research Institute, Barbados, 2015. We are grateful to the other workshop participants
for providing a stimulating research environment; in particular we thank Jean-Lou De Carufel and Stefanie Wuhrer for various helpful discussions.
This work was continued at the \emph{Winter School on Computational and Combinatorial Geometry at University of Havana},  Cuba, 2016.

\small
\bibliographystyle{abbrv}

Computational Geometry (cs.CG); Combinatorics (math.CO)