---
title: Bent Squares in Boolean Function Analysis
url: https://www.emergentmind.com/topics/bent-squares
type: topic
---

# Bent Squares in Boolean Function Analysis

Bent squares are matrix representations of bent Boolean functions. For even \(n\), a bent square is a \(2^{n/2}\times 2^{n/2}\) matrix such that each row and each column is the Walsh spectrum of a Boolean function in \(n/2\) variables. In this formulation, the flat-spectrum condition that defines bentness is recast as a local row-and-column spectral constraint on a square array. This representation is central in "A lower bound on the number of bent squares" [2508.14605], where it is used to construct and count a large family of bent functions, leading to the bound
\[
b_n \ge 32\,\frac{m_n^4}{s_n^4}
\]
and, for every even integer \(n\ge 4\),
\[
\log_2 b_n \ge n\cdot 2^{n/2}\left(1+O\!\left(\frac1n\right)\right).
\]

## 1. Spectral setting and bentness

A Boolean function in \(n\) variables is a map
\[
f:\mathbb{F}_2^n \to \mathbb{F}_2.
\]
Its Walsh transform is
\[
W_f(y)=\sum_{x\in \mathbb{F}_2^n} (-1)^{f(x)\oplus \langle x,y\rangle},
\]
where \(\langle x,y\rangle\) is the standard inner product over \(\mathbb{F}_2\). A function \(f\) is called bent if \(n\) is even and
\[
W_f(y)\in \{\pm 2^{n/2}\}\qquad \text{for all } y\in \mathbb{F}_2^n.
\]
Equivalently, every Walsh coefficient has the same absolute value \(2^{n/2}\), so bent functions are maximally nonlinear [2508.14605].

The same condition can be expressed with Hadamard matrices. Let \(H_0=(1)\) and define recursively
\[
H_k= \begin{pmatrix} H_{k-1} & H_{k-1}\\ H_{k-1} & -H_{k-1} \end{pmatrix}.
\]
Then \(H_n^2=2^n I\). If one writes the sign vector of \(f\) as \([(-1)^{f(x)}]\), ordered lexicographically by \(x\in\mathbb{F}_2^n\), then the Walsh spectrum is
\[
[(-1)^{f(x)}]\,H_n.
\]
Thus \(f\) is bent exactly when every entry of this vector is \(\pm 2^{n/2}\).

This spectral formulation is the background for bent squares. It isolates the Walsh spectrum as the primary invariant and makes it natural to reorganize the truth table of a bent function into a square matrix.

## 2. Matrix representation and the bent-square correspondence

Suppose now that \(n\) is even. Given a bent function \(f\), let \(\mathcal A_f\) be the \(2^{n/2}\times 2^{n/2}\) matrix whose rows are consecutive blocks of length \(2^{n/2}\) from the vector \([(-1)^{f(x)}]\). The associated bent square is then defined by
\[
\mathcal B_f=\mathcal A_f H_{n/2}.
\]

Two structural facts explain why this matrix is special. Since \(H_{n/2}^2=2^{n/2}I\),
\[
2^{-n/2}\mathcal B_f H_{n/2}=\mathcal A_f,
\]
so every row of \(\mathcal B_f\) is the Walsh spectrum of some Boolean function in \(n/2\) variables. Also,
\[
2^{-n/2}\mathcal B_f^{\intercal} H_{n/2}
\]
contains the entries of
\[
2^{-n/2}[(-1)^{f(x)}]H_n,
\]
and because \(f\) is bent, these are all \(\pm 1\). Hence every column of \(\mathcal B_f\) is also the Walsh spectrum of some Boolean function in \(n/2\) variables [2508.14605].

The resulting definition is exact:

> A bent square is a \(2^{n/2}\times 2^{n/2}\) matrix such that each row and each column is the Walsh spectrum of a Boolean function in \(n/2\) variables.

The representation is not merely one-way. Any matrix with this property is a bent square corresponding to some bent function in \(n\) variables. Bent squares therefore give a genuine correspondence between bent functions in \(n\) variables and these square matrices.

In small dimension, the first nontrivial type-2 case is \(n=4\). Then rows and columns of a bent square correspond to Boolean functions in \(2\) variables, and a type 2 Walsh spectrum has four nonzero entries of size
\[
2^{4/2-1}=2,
\]
supported on a \(2\)-dimensional affine subspace of \(\mathbb F_2^2\). Since \(\mathbb F_2^2\) itself is a \(2\)-dimensional affine space, all four positions are nonzero, with an odd number of positive signs.

The significance of the correspondence is methodological. Instead of constructing a bent function directly in \(n\) variables, one constructs a square matrix whose rows and columns are valid Walsh spectra in \(n/2\) variables. This converts a global nonlinear spectral condition into a structured matrix design problem.

## 3. Sparse row and column spectra

Following Agievich, two sparse classes of Walsh spectra play a distinguished role in the bent-square approach. They are the elementary row and column types used in the counting argument [2508.14605].

| Type | Nonzero entries | Structural property |
|---|---:|---|
| Type 1 | exactly one | value \(\pm 2^{n/2}\) |
| Type 2 | exactly four | each equals \(\pm 2^{n/2-1}\) |

For type 1, if a Boolean function in \(n/2\) variables is affine, then its Walsh spectrum has exactly one nonzero entry, namely \(\pm 2^{n/2}\).

For type 2, if \(n\ge 4\) and a Boolean function in \(n/2\) variables is EA-equivalent to a single quadratic monomial, then its Walsh spectrum has exactly four nonzero entries, each equal to \(\pm 2^{n/2-1}\). The indices of these four nonzero entries form a \(2\)-dimensional affine subspace of \(\mathbb F_2^{n/2}\), and the number of positive entries among the four is odd.

Bent squares whose rows and columns are all of type 1 are easy to count, giving
\[
2^{2^{n/2}}\,(2^{n/2})!
\]
such bent squares. However, this family is asymptotically too small for the lower bound sought in [2508.14605]. The decisive gain comes from bent squares built only from type 2 rows and columns.

The type 2 condition is especially useful because it separates support geometry from sign geometry. The support must lie on an affine \(2\)-flat, while the sign pattern must have odd positive parity. The combinatorial construction exploits exactly these two constraints.

## 4. Signature combinatorics and block construction

The core construction begins with a set \(M_n\) of binary matrices of size
\[
2^{n/2-1}\times 2^{n/2-1}
\]
such that each row and each column contains exactly two nonzero entries. Rows and columns are indexed by elements of \(\mathbb F_2^{n/2-1}\).

Two signatures are associated with a matrix in \(M_n\). The vertical signature records, for each row, the XOR of the two column indices where the row has nonzero entries. The horizontal signature records, for each column, the XOR of the two row indices where the column has nonzero entries. These signatures encode the affine-subspace pattern required for type 2 spectra.

Two lemmas are used repeatedly. The first is a Cauchy-style collision bound: if \(F:X\to Y\) is any map between finite sets, then there are at least
\[
\frac{|X|^2}{|Y|}
\]
ordered pairs \((x_1,x_2)\in X\times X\) with \(F(x_1)=F(x_2)\). The second states that for each matrix in \(M_n\), there is at least one partition of its nonzero entries into two subsets such that every row and every column contains one entry from each subset. The proof views nonzero entries as vertices of a graph in which two vertices are joined whenever they lie in the same row or the same column; because each row and column has exactly two nonzero entries, the graph is \(2\)-regular, hence a disjoint union of even cycles, so it is bipartite [2508.14605].

From here the construction selects four matrices
\[
A,B,C,D\in M_n
\]
with matched signatures:
- \(A\) and \(B\) have the same vertical signature;
- \(C\) and \(D\) have the same vertical signature;
- \(A\) and \(C\) have the same horizontal signature;
- \(B\) and \(D\) have the same horizontal signature.

These are assembled into the block matrix
\[
\begin{pmatrix} A & B\\ C & D \end{pmatrix}.
\]
The signature conditions ensure that in each row and each column, the positions of the four nonzero entries form a \(2\)-dimensional affine subspace of \(\mathbb F_2^{n/2}\), which is precisely the support pattern required for a type 2 Walsh spectrum. The nonzero entries are then replaced by signs \(\pm 2^{n/2-1}\) so that each row and each column has an odd number of positive entries. The paper explicitly shows that there are at least \(32\) valid sign assignments for each such block pattern.

This construction isolates the support problem in the matrices \(A,B,C,D\) and the sign problem in the bipartite partition from Lemma 2. That separation is what makes a systematic counting argument possible.

## 5. Counting bent squares and the lower bound on bent functions

Let
\[
m_n=|M_n|,
\qquad
s_n=\text{number of distinct vertical signatures}
\]
with the same count for horizontal signatures. A result of Knuth gives
\[
m_n =2^{\frac12 n\cdot 2^{n/2}\left(1+O\!\left(\frac1n\right)\right)},
\]
and the signature count satisfies
\[
s_n \le \left(2^{n/2-1}-1\right)^{2^{n/2-1}-1}
=2^{\frac14 n\cdot 2^{n/2}\left(1+O\!\left(\frac1n\right)\right)}.
\]
The last signature entry is determined by the previous ones because the XOR of all row-signature values must vanish [2508.14605].

The collision lemma is then applied twice. First, there are at least
\[
\frac{m_n^2}{s_n}
\]
ordered pairs \((A,B)\) with the same vertical signature. Second, among these, considering horizontal signatures, there are at least
\[
\frac{m_n^4}{s_n^4}
\]
ordered quadruples \((A,B,C,D)\) satisfying the four signature-matching conditions. Since each such support pattern has at least \(32\) valid signings, one obtains the explicit inequality
\[
\boxed{\,b_n \ge 32\,\frac{m_n^4}{s_n^4}\, }.
\]

Substituting the asymptotics for \(m_n\) and \(s_n\) yields the main theorem:
\[
\boxed{\log_2 b_n \ge n\cdot 2^{n/2}\left(1+O\!\left(\frac1n\right)\right)}
\]
for every even integer \(n\ge 4\).

The result improves the leading exponential constant in the known lower bounds. Previous bounds had the form
\[
\log_2 b_n \ge c\, n\cdot 2^{\frac n2(1+o(1))}
\]
with known values \(c=\tfrac12\) from earlier work and \(c=\tfrac34\) via a construction of Baksova and Tarannikov. The bent-square method reaches \(c=1\).

This is a lower-bound theorem, not an exact enumeration. It is obtained by constructing and counting a substantial subclass: bent functions whose associated bent squares have every row and every column of type 2.

## 6. Significance, limitations, and terminological scope

The bent-square viewpoint translates the global bentness condition on a function in \(n\) variables into a local spectral condition on rows and columns of a matrix of dimension \(2^{n/2}\). In the language of [2508.14605], it creates a bridge between harmonic or spectral properties of Boolean functions and combinatorial matrix constructions. The paper exploits this bridge through sparse type 2 spectra and a counting argument on block-supported square matrices.

The scope of the result is explicit. It applies for all even integers \(n\ge 4\). It concerns \(b_n\), the total number of bent functions in \(n\) variables, but proves the lower bound by counting only a particular subclass arising from bent squares with type 2 rows and columns. The actual number of bent functions may therefore be much larger. The estimate
\[
b_n \ge 32\,\frac{m_n^4}{s_n^4}
\]
is also not intended to be optimal; the paper remarks that refinements may improve constants, but are not expected to change the leading asymptotic constant \(1\) in
\[
\log_2 b_n \ge n\cdot 2^{n/2}\left(1+O\!\left(\frac1n\right)\right).
\]

A common source of confusion is terminological. In bent-function theory, bent squares are the Walsh-spectral square matrices described above. In another literature, "bent squares" denotes regular but nonflat squares embedded in \(\mathbb R^3\), with all four side lengths equal and all four interior angles equal to a common angle \(\theta<\pi/2\); those objects are used to study one-dimensional periodic tilings exhibiting bending, wrinkling, or rolling up [2108.01954]. The two notions are unrelated except for the phrase itself.

A second nearby but distinct matrix tradition occurs in the graph-and-design study of bent functions. "Classifying bent functions by their Cayley graphs" introduces square-array objects such as the weight class matrix
\[
M_{wc}(f)_{c,b}=wc\bigl(x\mapsto f(x+b)+\langle c,x\rangle+f(b)\bigr)
\]
and the SDP design incidence matrix
\[
M_D(f)_{c,x}=f(x)+\langle c,x\rangle+\widetilde f(c),
\]
but that paper does not define bent squares in the sense of the row-and-column Walsh-spectrum correspondence [1705.04507].

Bent squares, in the precise sense of [2508.14605], are therefore best understood as a matrix-theoretic language for bent Boolean functions. Their importance lies not in providing a full structural classification of all bent functions, but in furnishing a rigid and countable subclass whose combinatorics is rich enough to improve the best known asymptotic lower bound on \(b_n\).

Source: https://www.emergentmind.com/topics/bent-squares