How does a field $\phi(x,t)$ have infinite degrees of freedom and why are its inputs labels not variables? Consider a classical Lagrangian $L(q, \dot{q})$, which by definition has a discrete number of degrees of freedom. Now suppose we have a quantum field (or any field) which we denote by $\phi(x,t)$. It has been said that the latter has infinite degrees of freedom, but how is this the case? From the definition of $\phi$ it seems we have two: the position and the time.
Similarly, I have read that $x$ should be actually interpreted as a label and not a variable. Can anyone provide some intuition behind this? As I have understood it, the to obtain the value of $\phi$ at a point $(x,t)$ in spacetime we evaluate $\phi$ at $(x,t)$, thus it is a map $(x,t) \mapsto \phi(x,t)$, in which case they would be variables. What exactly does it mean for $(x,t)$ to be labels, and how are they not variables?
 A: Compare the Lagrangian
$$
L\left(q\left(t\right), \dot{q}\left(t\right)\right)
$$
in classical mechanics to the one in a scalar field theory
$$
\mathcal{L}\left(\phi\left(x,t\right), D\phi\left(x,t\right)\right)\,.
$$
A fallacy of your argument: When you are counting the arguments of $\phi$, the function that goes into the Lagrangian in field theory (or the action functional, if you like), to obtain the degrees of freedom, you should by analogy do the same in classical mechanics and obtain just one, which is obviously not the case for any problem in more than one dimensions.
The number $f$ of degrees of freedom is the number of parameters you can independently vary when describing a system. For example, for one particle in three dimensions you can independently vary its $x$-, $y$- and $z$-coordinate (or $r$, $\phi$, $\theta$ in spherical coordinates, whatever). In the above Lagrangian function for classical mechanics $q\left(t\right)$ is a short notation for the three components $q_1$, $q_2$ and $q_3$.
When working with $n$ particles what you are putting into the classical mechanics action functional is a mapping $t \mapsto q\left(t\right) \in \mathbb{R}^{3n}$. And the dimension of the space that function maps to is the number of DOF. Now, when working with field theory what you are putting in is a function of two arguments and for every $t$ you don't have an $\mathbb{R}^{3n}$ to describe the system state, but an infinite-dimensional function space, i.e. you have $t \mapsto \phi\left(.,t\right) \in C^\infty\left(\mathbb{R}^3\right)$ (or whatever function space you choose).
A: How many independent elements/variables do you need to represent all the position of a point in space? 3.
How many independent elements do you need to represent all the functions? You need to find the dimension of a basis of functions, whose linear combinations can represents all the functions. How many are they? Infinite.
As an example:

*

*polynomial basis: $1, x, x^2, \dots$;

*harmonic functions for $2\pi$-periodic functions: $1, \cos(x), \cos(2x), \dots, \sin(x), \sin(2x), \dots$;

*$\dots$
In general, continuous functions in space can be represented as a linear combinations of base functions with coefficients that are function of time,
$f(x,t) = \sum_{i=1}^{\infty} F_i(t) \phi_i(x)$.
Usually, a good choice of a basis $\phi_i(x)$ allows you to have a good approximation of f(x,t) with a small number of $\phi_i(x)$, namely
$f(x,t) \simeq \sum_{i\in A} F_i(t) \phi_i(x)$,
being $A$ the subset of the infinite basis, whose linear combinations are a "good enough" (for you) approximation of the function $f(x,t)$.
Numerical simulations.
This is exactly the same process you perform in finite element methods, spectral element methods or other numerical methods.
As an example, base functions are compact function in finite element methods; these functions are usually determined by the degree of the local approximation and by the mesh used for the numerical problem.
When you refine the mesh, you're implicitly increasing the number of base function $\phi_i(x)$ used for the numerical approximation of the fields. When you change the degree of the approximation, you're changing the family of the base function $\phi_i(x)$.
Reduction.
In numerical simulations, in order to select a more efficient set of base functions, sometimes you don't rely on the full basis induced by the grid, but you evaluate a subset of all the possible linear combinations of the base functions.
For some examples about reduction:

*

*modal analysis

*balanced truncation

*proper orthogonal decomposition

*...

