Concepts / Fourier Basis Functions

Fourier Basis Functions

A d-dimensional unit hypercube contains state vectors s = (s₁, ..., s_d)ᵀ with every component in [0, 1].

  • Programming

From Coordinates to Functions

A Fourier basis extends the idea of using cosine functions from one dimension to a multidimensional state space. The state space is a d-dimensional unit hypercube, and each state is represented by a vector. A basis function then combines one cosine component for every dimension, allowing cosine-based functions to represent functions over the entire state space.

Tracing a Frequency Choice

Now trace what happens when a frequency vector is chosen. Let c_i be an integer frequency vector with one component for each dimension. The component of c_i associated with a dimension selects the cosine frequency for that dimension. The dot product c_i · s gathers the frequency information across the dimensions, while the multidimensional basis function is built from the corresponding cosine components.

Reading the vector (1, 0)

Interpret the frequency vector (1, 0)ᵀ for a two-dimensional state.

Identify the dimensions: There are two entries in the vector, so the vector assigns one frequency choice to each of two dimensions.

Read the first entry: The first entry is 1, so the first dimension receives the higher available frequency in this example.

Read the second entry: The second entry is 0, so the second dimension receives the zero frequency.

Interpret the basis function: The resulting basis function has one cosine component for the first dimension and one cosine component for the second dimension, using the frequencies selected by the two entries.

The vector (1, 0)ᵀ selects a higher-frequency cosine component along the first dimension and a zero-frequency cosine component along the second dimension.

first entrysecond entrycᵢ(1, 0)ᵀDimension 1frequency 1Dimension 2frequency 0
How does each entry of an integer frequency vector select a cosine frequency for its corresponding dimension?

Multiplying One Cosine per Dimension

A multidimensional Fourier basis function is not a single independent cosine with one frequency for the whole state. It has one cosine component for each dimension. The frequency vector supplies the choice for each component, and the components are multiplied together to form one basis function over the multidimensional state space. In two dimensions, the construction combines a cosine for the first coordinate with a cosine for the second coordinate. In d dimensions, it combines d cosine components.

multiplymultiplymultiplyCosine 1dimension 1Basis functionproduct of cosinecomponentsCosine 2dimension 2Cosine ddimension d
How do separate one-dimensional cosine functions combine into one basis function over a multidimensional state?

The frequency vector does not describe a new dimension. It supplies one frequency choice for each existing state-space dimension. The resulting basis function keeps the same number of cosine components as the state has dimensions.

Counting the Complete Basis

To count the basis functions, first list the allowed frequency values for one dimension. For an order-N basis, each frequency component can range from 0 through N. That gives N + 1 choices for each dimension. Because every dimension receives its own component of the frequency vector, the total number of possible frequency vectors, and therefore basis functions, is (N + 1)^d.

choose forchoose forchoose forcombine choicescombine choicescombine choices0 through NN + 1 choicesDimension 1N + 1 choicesBasis functions(N + 1)^dDimension 2N + 1 choicesDimension dN + 1 choices
How do the available choices in each dimension produce exactly (N + 1)^d basis functions?

An order-2 basis in three dimensions

Count the possible basis functions when d = 3 and the order is N = 2.

Count choices per dimension: Each frequency component can be 0, 1, or 2, so each dimension has 3 possible frequency choices.

Combine the dimensions: A frequency vector has one independently selected component for each of the three dimensions.

Count all vectors: The number of combinations is 3 multiplied by 3 multiplied by 3, which is 27.

An order-2 basis in three dimensions contains 27 possible frequency vectors and therefore 27 basis functions.

Mistakes in Interpretation

  • Treating the state vector as the frequency vector.

    The state vector describes the coordinates of a point in the unit hypercube. The integer vector c_i selects the cosine frequencies.

    Fix: Use s for the state-space location and c_i for the per-dimension frequency choices.

  • Using one frequency choice for the entire multidimensional state.

    Each frequency vector has one component for each dimension.

    Fix: Read one frequency component for dimension 1, one for dimension 2, and continue through dimension d.

  • Counting only the allowed values instead of all combinations.

    The value 3 counts choices for one dimension, not complete frequency vectors across three dimensions.

    Fix: Multiply the N + 1 choices across all d dimensions, giving (N + 1)^d.

  • Adding cosine components instead of using the product structure.

    The basis function is formed as a product of cosine components, with one component for each dimension.

    Fix: Track the cosine selected for every dimension and combine those components by multiplication.

Apply the Structure

MEDIUM

A state space has d = 2 dimensions, and an order-N basis uses N = 1. List the possible frequency vectors and explain what the vector (0, 1)ᵀ means for the two cosine components.

Hints
  • For N = 1, each component can be 0 or 1.
  • Build every two-entry combination from those choices.
  • The first entry belongs to the first dimension, and the second entry belongs to the second dimension.
  1. A d-dimensional unit hypercube represents each state with a vector whose components lie in [0, 1]. An integer frequency vector has one component per dimension and assigns the cosine frequency for that dimension. The corresponding Fourier basis function multiplies one cosine component per dimension. For order N, every component has N + 1 choices, so the complete basis contains (N + 1)^d functions.

Key Takeaways

  • A state vector s records a point in a d-dimensional unit hypercube, with every component between 0 and 1.
  • An integer frequency vector c_i contains one frequency choice for each state-space dimension.
  • A multidimensional basis function is formed by multiplying one cosine component per dimension.
  • For order N, each frequency component has N + 1 choices, producing (N + 1)^d basis functions.