An Exterior Algebraic Derivation of the Euler-Lagrange Equations from the Principle of Stationary Action

In this paper, we review two related aspects of field theory: the modeling of the fields by means of exterior algebra and calculus, and the derivation of the field dynamics, i.e., the Euler-Lagrange equations, by means of the stationary action principle. In contrast to the usual tensorial derivation of these equations for field theories, that gives separate equations for the field components, two related coordinate-free forms of the Euler-Lagrange equations are derived. These alternative forms of the equations, reminiscent of the formulae of vector calculus, are expressed in terms of vector derivatives of the Lagrangian density. The first form is valid for a generic Lagrangian density that only depends on the first-order derivatives of the field. The second form, expressed in exterior algebra notation, is specific to the case when the Lagrangian density is a function of the exterior and interior derivatives of the multivector field. As an application, a Lagrangian density for generalized electromagnetic multivector fields of arbitrary grade is postulated and shown to have, by taking the vector derivative of the Lagrangian density, the generalized Maxwell equations as Euler--Lagrange equations.


Introduction
In classical mechanics, the action is a scalar quantity, with units of energy × time, that encodes the dynamical evolution of a given physical system; mathematically, the action is given by an integral functional of the trajectory or dynamical path (or an integral of the Lagrangian density for field theories) followed by the physical system over space-time. The principle of stationary action states that the actual dynamical path followed by the system, subject to some appropriate boundary constraints, possibly at infinity, corresponds to a stationary point of the action [1] (Ch. 19), [2] (Section 8). An application of the principle yields the Euler-Lagrange equations, which describe the dynamics of the system [3] (Section I.3), [4] (Section 3.1), [5] (Section 7.2). The historical development of the stationary-action principle-in essence, a far-reaching generalization of Fermat's principle-that states that light follows the shortest-time path between two points is described in detail in [6] (Section X).
This paper revisits the derivation of the Euler-Lagrange equations for field theories from the principle of stationary action from the point of view of exterior algebra and calculus. There exist several alternative mathematical representations for the fields, ranging from the original vector calculus by Gibbs [7] and Heaviside to geometric and Clifford algebras [8], where vectors are replaced by multivectors and operations such as the cross and the dot products subsumed in the geometric product; a modern perspective on the use of geometric algbra in physics is given in [9]. Early in the 20th century, tensors such as the Faraday tensor in electromagnetism were quickly and almost universally adopted as the natural mathematical representation of fields in space-time [10] (pp. 135-144). In parallel, mathematicians such as Cartan generalized the fundamental theorems of vector calculus i.e., Gauss, Green, and Stokes, by means of differential forms [11]. Later on, differential forms were used in Hamiltonian mechanics, e.g., to calculate trajectories as vector field integrals [12] (pp. 194-198). Since differential forms may be seen as the circulation or flux over appropriate space-time regions of multivector fields, it may be preferable in some contexts to directly study the multivector fields. Therefore, we build our analysis on the exterior algebra originally developed by Grassmann [13], which has comparatively received little attention in the literature and leads to simple formulae that merge the simplicity and intuitiveness of standard vector calculus with the power of tensors and differential forms [14,15].
In Section 2, we provide the necessary background on exterior algebra and calculus, including the important notion of multivector-valued derivative with respect to a vector v. Then, we obtain in Section 3 two related coordinate-free forms of the Euler-Lagrange equations for the dynamics of a multivector field a of grade r as vector derivatives of the Lagrangian density L. Our work is related to the geometric-algebraic multivectorial formulation of the Euler-Lagrange equations in [16] (Equations (4.7) and (4.8)). The first form in (39) is valid for a generic Lagrangian density that only depends on the first-order derivatives of the field, more specifically on the tensor derivative ∂ ⊗ a in (27), and is given by as a function of the vector and matrix derivatives ∂aL and ∂ ∂⊗a L in (28) and (29), respectively. The (k + n)-dimensional differential operator ∂ is defined in (20); together with the matrix product × defined in (19), the operation in the right-hand side generalizes the concept of the divergence of a field. The second form (47), expressed in exterior algebra notation, is specific to the case when the Lagrangian density depends only on exterior (denoted by ∂∧; see (21)) and interior derivatives (denoted by ∂ ; see (22)) of the multivector field, and is given by where r is the grade of the multivector field a. A complementary analysis, which shows the invariance of the action to infinitesimal space-time translations in exterior algebra, was conducted in [17], where the stress-energy-momentum tensor is evaluated and profusely discussed. We conclude the paper in Section 4 with an application of our analysis to a Lagrangian density for generalized electromagnetic multivector fields that leads, by directly taking the vector derivative of the Lagrangian density, to the generalized Maxwell equations for multivector fields of grade r [15]. We also provide a short discussion, of independent interest, of a dual form of Maxwell equations where the exterior derivative is replaced by the interior derivative in the definition of the field from the potential.
2 Fundamentals of Exterior Algebra and Calculus: Notation, Definitions, and Operations

Multivector Fields
While our space-time has four space-time dimensions in relativistic terms, it will prove convenient to consider a generic flat space-time R k+n with k temporal dimensions and n spatial dimensions, as this generality allows for a more natural description of the underlying algebraic structure of the equations and of their derivations. Points and position in space-time are denoted by x, with components xi in the canonical basis {ei} k+n−1 i=0 ; by convention, the first k indices, i.e., i = 0, . . . , k−1, correspond to time components while the indices i = k, . . . , k + n − 1 represent space components. We let space and time coordinates have the same units. Although we shall not make use of this fact, space-time vectors transform contravariantly under changes of coordinates.
In exterior algebra, one considers vector spaces whose basis elements eI are indexed by lists I = (i1, . . . , im) drawn from Im, the set of all ordered lists with m nonrepeated indices, with m ∈ I = {0, 1 . . . , k + n}. Later on, in (6), we express the basis elements eI in terms of the vectorial canonical basis ei, for an ordered list i1, . . . , im. These vectors, which we identify with fields, live in the tangent space and transform covariantly under changes of coordinates [18] (Ch. 2), [19] (Ch. V). We refer to elements of these vector field spaces as multivector fields of grade m. While multivector fields do not cover all relevant physical models, e.g., spinor fields or the tensor field in general relativity, they do model a number of interesting cases; for instance, a scalar field is represented by multivectors of grade 0, the electric field, the electromagnetic vector potential and source current by multivectors of grade 1, and the electromagnetic field by a multivector of grade 2. A multivector field a(x) of grade m, possibly a function of the position x, with components aI (x) in the canonical basis {eI }I∈I m can be written as We denote by gr(a) the operation that returns the grade of a vector a and by |I| the length of a list I. The dimension of the vector space of all grade m multivectors is k+n m , the number of lists in Im.

Operations on Index Lists
As the basis elements of multivector fields are indexed by lists I, it proves convenient to define some basic operations on such lists: permutations and their signatures, concatenations (mergers), and subtractions of lists. First of all, if the list I is not ordered, let σ(I) denote the signature of the permutation sorting the elements of I in increasing order. If the permutation is even (resp. odd), the signature is +1 (resp. −1). If the list I contains repeated indices, its signature is 0.
More generally, for two index lists I and J with respective lenghts m = |I| and m ′ = |J|, let (I, J) = {i1, . . . , im, j1, . . . , j m ′ } be the concatenation of the two index lists I and J. We let σ(I, J) denote the signature of the permutation sorting the concatenated list of |I| + |J| indices, and let I + J, or ε(I, J) if the notation I + J is ambiguous in a given context, denote the sorted concatenated list, which we refer to as merged list.
In general, we view the lists as ordered sets, and apply standard operations on sets to the lists. For instance, I is contained in J, the list J \ I is the result of removing from J all the elements in I, while keeping the order. As another example, we denote by I c the complement of I, namely the ordered sequence of indices not included in I. We denote the empty list by ∅; it holds that σ(∅, K) = σ(K, ∅) = 1 for an ordered list K, and that e ∅ = 1.

Operations on Multivectors
We next define several operations acting on multivectors; our presentation loosely follows [14] (Sections 2 and 3) and [15] (Section 2) and is close in spirit and form to vector calculus. Introductions to exterior algebra from the perspective and language of differential forms can be found in [18,19]. A geometric algebra perspective can be found in [9]. With no real loss of generality, we define the operations only for the canonical basis vectors, the operation acting on general multivectors being a mere extension by linearity of the former.
First, the dot product · of two arbitrary grade m basis vectors eI and eJ is defined as where I and J are the ordered lists I = (i1, i2, . . . , im) and J = (j1, j2, . . . , jm) and ∆ij = 0 if i = j, and we let time unit vectors ei have negative metric ∆ii = −1 and space unit vectors ei have positive metric ∆ii = +1. When m = 0, we interpret the dot product in (4) as 1 since e ∅ = 1.
The following operations to be defined are the interior and exterior products, which subsume and generalize the operations of gradient, curl, and divergence of vector calculus to multivector fields. These operations transform pairs of multivectors into a multivector of a different grade, introducing in the process some signs, i.e., ±1. When these signs are related to the dot product in (4), we explicitly write the signs as quantities such as ∆IJ . Other sign contributions arise from the signatures of permutations ordering lists of indices. A common practice in the literature to deal with these signatures is to write factors such as (−1) |I|+|J | . However, it seems more convenient to explicitly keep track of the lists and write the permutation associated to this factor, e.g., σ(I, J), as clearer connections between different formulae can be established by harnessing the power of group theory for permutations.
Let two basis vectors eI and eJ have grades m = |I| and m ′ = |J|. As defined in Section 2.2, let (I, J) = {i1, . . . , im, j1, . . . , j m ′ } be the concatenation of the two index lists I and J, let σ(I, J) denote the signature of the permutation sorting the elements of this concatenated list. Then, the exterior product of eI and eJ is defined as eI ∧ eJ = σ(I, J)eI+J .
The exterior product is thus either zero or a multivector of grade |I| + |J|, since σ(I, J) = 0 when the lists I and J have elements in common. The unit scalar (multivector of grade 0) is an identity of the exterior product, as 1 ∧ eI = eI ∧ 1 = eI . The exterior product provides a construction of the basis vector eI , with I an ordered list I = (i1, . . . , im), from the canonical basis vectors ei, namely eI = ei 1 ∧ ei 2 ∧ · · · ∧ ei m .
When I = ∅, we adopt the usual convention that the right-hand side is 1. We next define two generalizations of the dot product, the left and right interior products. Let eI and eJ be two basis vectors of respective grades |I| and |J|. The left interior product, denoted by , is defined as Although we might have overloaded the meaning of σ(J \ I, I) to be zero when I J, we prefer to list the separate cases in (7). The vector e J \I has grade |J| − |I| and is indexed by the elements of J not in common with I. The use of the word left represents the fact that eI acts from the left on eJ and removes the elements in I from J.
Analogously, the right interior product, denoted by , of two basis vectors eI and eJ is defined as As in the previous case, the use of the word right represents the fact that eI acts from the right on eJ and removes the elements in I from J. The unit scalar (multivector of grade 0) acting from the left (resp. right) is an identity of the left (resp. right) interior product, as 1 eI = eI 1 = eI .
It proves instructive to evaluate the left and right interior products between two multivectors of the same grade, i.e., if |I| = |J|. From (7) and (8), and taking into account that σ(∅, K) = σ(K, ∅) = 1 for an ordered list K, and that e ∅ = 1, we see that supporting the idea that the interior products generalize the dot product. Both interior products are grade-lowering operations, as the interior product is either zero or a multivector of grade |J| − |I|. Finally, we define the complement of a multivector. For a multivector eI with grade m, its Grassmann or Hodge complement, denoted by e H I , is the unit (k + n − m)-vector where I c is the complement of the list I and σ(I, I c ) is the signature of the permutation sorting the elements of the concatenated list (I, I c ) containing all space-time indices. In other words, eIc is the basis multivector of grade k + n − m whose indices are in the complement of I. In addition, we define the inverse complement transformation as The interior products are not independent operations from the exterior product, as they can be expressed in terms of the latter, the Hodge complement and its inverse: The vector calculus cross product between two vectors in R 3 can be expressed in several alternative ways in terms of the interior, and exterior products and Hodge dual [14] (Equation (18)). This fact allows us to distinguish various roles that the cross product takes in Maxwell equations and lies at the origin of generalized electromagnetism described by multivectors in generic flat space-time [15].

Matrix Vector Spaces
We do not need to consider general tensor fields but rather the matrix field (vector) space whose basis elements can be represented as wI 1 ,I 2 , where both I1 and I2 are ordered lists of nonrepeated ℓ1 and ℓ2 elements, respectively. We may identify these basis elements with the tensor product of two multivectors of grade ℓ1 and ℓ2, namely The dimension of the vector space spanned by these basis elements is k+n ℓ 1 k+n ℓ 2 ; the elements of this vector space can be identified with matrices A whose rows and columns are indexed by lists, I1 ∈ I ℓ 1 and I2 ∈ I ℓ 2 , respectively, The transpose of a matrix element wI 1 ,I 2 , denoted as w T I 1 ,I 2 , is defined as wI 2 ,I 1 . These matrices, the underlying vector space, and the operations that we describe next are fundamental in the study of changes of coordinates in space-time. However, consideration of these changes is beyond the scope of this paper. To any extent, this short section provides a perspective on matrices from the point of view of exterior algebra, highlighting the connections between multivectors and matrices, and bypassing the standard introduction of tensor fields.
As we did with multivectors, we consider the dot product · of two arbitrary matrix basis elements wI 1 ,I 2 and wJ 1 ,J 2 . This dot product is written The ordering within the pairs (I1, I2) and (J1, J2) is important in (16). This dot product, when applied to two matrices, is seen to give their Frobenius inner product, or equivalently, the square of the Frobenius norm (also known as the Hilbert-Schmidt norm) [20] when the product is of a matrix with itself.
We also define the matrix product × between two matrix basis elements wI,J and wK,L as an operation that coincides with the standard product of two matrices for matrices labeled by spatial indices. For square matrices A indexed by grade m multivectors, it is natural to define the matrix inverse (whenever the inverse exists), denoted as where the grade ℓ square identity matrix, denoted by I ℓ , is given by Last, we define the matrix product × between a matrix wI,J and a multivector eK (or between a multivector eK and the matrix wJ,I , i.e., the transpose of wI,J ) as a generalization of the idea of multiplication of a row (or column) vector by a matrix.

Exterior and Matrix Calculus
In vector calculus, extensive use is made of the partial time derivative, ∂t, and the nabla operator ∇ of partial space derivatives. In our case, we need the generalization to (k, n) space-time to the differential vector operator ∂, defined as As was done in [14] (Section 3), we define the exterior derivative, ∂ ∧ a, of a given multivector field a of grade m as The grade of the exterior derivative of a is m + 1, unless m = k + n, in which case the exterior derivative is zero. In addition, we define the interior derivative, ∂ a, of a as ∂ a = i∈I,I∈Im: i∈I The grade of the interior derivative of a is m − 1, unless m = 0, in which case the interior derivative is zero. The formulae for the exterior and interior derivatives allow us to recover some standard formulae in vector calculus. For a scalar function φ, its gradient is given by its exterior derivative ∇φ = ∂ ∧ φ, while for a vector field v, its divergence ∇ · v is given by its interior derivative ∇ · v = ∂ v. Also, for a vector fields v in R 3 , taking into account [14] (Equation (18)), the curl can be variously expressed as thereby generalizing both the cross product and the curl to grade m vector fields in space-time algebras with different dimensions. Specific vector calculus formulae such as that for the divergence of a gradient or the curl of the curl of a vector can be seen as instances of general exterior calculus formulae such as [14] (Equation (38)) and [15] (Equation (35)), where in (23), a and b are 1-vectors, while in (24), a and b are (s − 1)-vector and s-vector, respectively. The exterior and interior derivatives satisfy the property ∂ ∧ (∂ ∧ a) = 0 = ∂ (∂ a), for a general twice-differentiable multivector field a. These identities imply the well-known facts that the curl of the gradient and the divergence of the curl are zero.
The circulation C(a, V ℓ ) and the flux F(a, V ℓ ) of a multivector field a over an ℓ-dimensional space-time hypervolume V ℓ are defined as integrals of interior products of the field with infinitesimal integration volumes: As a specific example for (26), the flux of a field over an (k + n)-dimensional hypervolume is the volume integral of the field. For both of these operations, the interior product in the integrand is expressed as a differential form, which allows us to invoke the theory of differential forms to prove a Stokes theorem. This Stokes theorem relates the circulation (resp. the flux) of the field over the boundary of some hypervolume to the circulation (resp. flux) over the same hypervolume of the exterior (resp. interior) derivative of the multivector field.
We also define the tensor derivative of a, ∂ ⊗ a, of a given vector field a of grade m as where wi,I is a matrix vector space basis element.
To conclude this section, we define a derivative operator with respect to an element of a vector space, e.g., a multivector field or a matrix. A relevant example of vector derivative operator is ∂, where the derivative is taken with respect to the position vector x. In general, the vector derivative operator with respect to a multivector field a of grade m (resp. matrix A of dimensions ℓ1 × ℓ2) is a multivector field (resp. matrix) denoted by ∂a (resp. ∂A) [21] and given by Specifically, we shall later need the exterior vector derivative of a scalar function g(x), denoted by ∂a ∧ g(x) or with some abuse of notation simply by ∂a g(x), and given by and similarly for the matrix derivative. This exterior vector derivative is thus some form of generalized gradient. We shall need the derivative of a scalar function given by a quadratic form in the field and/or its interior or exterior derivatives. Let a and b represent two vectors of the same grade. Evaluation of the vector derivatives is straightforward and coincides with the infinitesimal calculus expressions [21]: 3 Principle of Stationary Action: Derivation of the Euler-Lagrange Equations

General Case: Lagrangian Dependent on the Tensor Derivative
As we briefly reviewed in the Introduction, in classical mechanics, one defines the action S as a scalar quantity, with units of energy × time, that encodes the dynamical evolution of a physical system. Mathematically, the action S is an integral functional of the trajectory or path over space-time, or of the Lagrangian density L(x) for field theories, followed by the physical system. The principle of stationary action states the the path actually followed by the system, e.g., the field dynamics, corresponds to a stationary point of the action [1] (Ch. 19), [2] (Section 8).
In general, the application of the principle of stationary action gives the EulerLagrange equations, which describe the dynamics of the system [3] (Section I.3), [4] (Section 3.1), [5] (Section 7.2). We start by reviewing how to obtain these equations in coordinate-free form with tensorial notation. Differently from the usual approach, that gives the dynamics for the individual components of the field, our coordinate-free derivation directly works with some twice-differentiable multivector field a of grade s and its tensor derivative ∂ ⊗ a in (27).
For a given region R that comprises the physical system under consideration, let the action S(a) be given by We assume that the region R is large enough to make the physical system closed, and that the fields decay fast enough over R so that the flux of the fields over the boundary of R is negligible. We note that the Lagrangian density L is a real-valued function of the k+n s components of a and the (k + n) k+n s components of ∂ ⊗ a, and the Lagrangian density does not depend explicitly on the space-time components.
Let the field a be infinitesimally perturbed by an amount aε, possibly dependent on the space-time coordinates, so that the field is transformed as a → a + aε and the tensor derivative is transformed as ∂ ⊗ a → ∂ ⊗ a + ∂ ⊗ aε. We assume that aε is twice differentiable. We can expand the Lagrangian density in a first-order multivariate Taylor series, where the matrix of partial derivatives with respect to the (k + n + 1) k+n s variables is a block matrix having along the diagonal the vector derivatives ∂aL and ∂ ∂⊗a L of the density L with respect to the field a and its tensorial derivative ∂ ∂⊗a , defined in (28) and (29), respectively. Neglecting terms of second and higher order in the perturbation aε and grouping terms in the Taylor series yields We may thus evaluate the first-order change of action δS as always neglecting all the contributions of order (aε) 2 or higher in the action change.
Next, we note the following Leibniz product rule, an equality between scalar quantities proved in Appendix A.1, for a multivector field a and a matrix field B with basis wi,I , involving the product × defined in (19), Choosing a = aε and B = ∂ ∂⊗a L in (36), we can then rewrite Equation (35) as We identify the second integrand with a flux (26) over an (k +n)-dimensional hypervolume R and use the Stokes theorem [14] (Section 3.5) to rewrite the flux of the interior derivative of a vector field as the flux of the field itself across the region boundary ∂R. The second integral in (37) then vanishes if we assume that the field a and its perturbation aε vanish sufficiently fast at infinity. Under this assumption, if the change of action is zero for any perturbation of the field aε, the integrand in the first summand of (37) must be identically zero. Setting to zero the quantity between parentheses in the integrand yields the coordinate-free form of the Euler-Lagrangian equations, Both expressions in (38) and (39) are equivalent since they only differ in the notation for the vector derivative. It is also possible to recover a component form of the Euler-Lagrange equations from (39) [3] (Section I.3), [4] (Section 3.1), [5] (Section 7.2). Explicitly writing out the definitions in (28) and (29), we obtain the standard formula for each I ∈ Im, In general, the use of coordinate-free expression as in (39) is closer to the common practice of vector calculus and allows us to better identify the algebraic structure of the underlying equations, which gets obscured when the components are used. Moreover, expressions as (39) are better suited to generalizations, or more properly, particularizations, to exterior calculus when the Lagrangian depends on the exterior and interior derivatives of the field, rather than the tensor derivative. This case is explored and analyzed in the next subsection.

Derivation of the Euler-Lagrange Equations in Exterior Algebraic Form
For electromagnetism, the Lagrangian density L(x) is a function of the vector potential A, the bivector field F, and the source density vector J. Expressed in exterior calculus notation, the Lagrangian density is given by Remark 3.1. If the field is represented by an antisymmetric tensor of rank 2, the factor before F · F becomes − 1 4 to account for the repeated sum over pairs of indices [3] (Section I.5), [4] (Section 3.5), [2] (Section 27). ¶ The Lagrangian density depends on the field through the potential A and its exterior derivative F = ∂ ∧ A [15] (Section 3). Instead of using (39), which was derived from the assumption that the Lagrangian density depends explicitly only the field and its tensor derivative, it is worth obtaining the Euler-Lagrange equations when the Lagrangian density is a function of a generic multivector field a of grade s, and its exterior and interior derivatives.
As in (33), for a given region R that comprises the physical system under consideration, and assumed to be large enough to make the physical system closed so that the fields decay fast enough over R and the flux of the fields over the boundary of R is arbitrarily small, the action S(a) is given by the integral Again, for an infinitesimal perturbation of the field aε, and neglecting all the contributions of order (aε) 2 or higher in the Taylor expansion of the Lagrangian density and the action, the first-order change in action δS is given by From (35) in [15], given a vector a and a vector b of grade gr(a) + 1, the Leibniz product rule in (24) holds. Choosing a = aε and b = ∂ ∂∧a L (resp. a = ∂ ∂ a L and b = aε) in the second (resp. third) summand inside the integral, substituting these values in (24) and the result back into (43), we obtain In the second integrand, a flux over the (k + n)-dimensional region R, the Stokes theorem [14] (Section 3.5) allows us to rewrite the flux of the interior derivative as the flux across the region boundary ∂R. As both the field a and its perturbation aε vanish sufficiently fast at infinity, the first-order change in action is given by (45) and the principle of stationary action, namely that the first-order change in action identically vanishes, leads to the coordinate-free form of the Euler-Lagrange equations, in one of the two equivalent forms: .
It might appear that the tensorial and multivectorial expressions in (39) and (47) differ. If the Lagrangian density depends on the tensor derivative only through the interior and exterior derivatives, we verify in Appendix A.2 that both expressions are indeed identical and the following identity holds: .
4 Application to Generalized Electromagnetism: Maxwell Equations

Generalized Maxwell Equations
As application of the methods derived in the previous section, we study the generalized Maxwell equations [15] and their associated fields. For a given natural number r, the Maxwell field F(x) and the generalized source density J(x) are respectively characterized by multivector fields of grade r and r − 1 at every point x of the flat (k, n)-space-time [15] (Section 3). The potential field A(x) is a multivector field of grade r − 1 such that If we replace the potential A by a new field A ′ = A +Ā + ∂ ∧ G, whereĀ is a constant (r − 1)-vector and G is an (r − 2)-vector gauge field, the homogenous Maxwell Equation (51) is unchanged [15] (Section 3). For a given Maxwell field, there is therefore some unavoidable (gauge) ambiguity on the value of the vector potential. Scalar fields are given by the vector potential by setting r = 1 in Minkowski space-time, namely k = 1 and n = 3. For classical electromagnetism (r = 2, k = 1, n = 3), the bivector field is usually expressed as an antisymmetric tensor of rank 2; electrostatics and magnetostatics are recovered for k = 0, n = 3, by setting r = 1 and r = 2, respectively. The generalized Maxwell equations for arbitrary values of r, k, and n are the following pair of coupled differential equations: The interior derivative in (50) and the exterior derivative in (51) are respectively defined in (22) and (21). As we stated in Section 2.5, the interior derivative lowers the grade by one, while the exterior derivative increases the grade by one; therefore, Equation (50) is an identity of (r − 1)-vectors while Equation (51) is an identity of (r + 1)-vectors.

Lagrangian Density for Generalized Electromagnetism
For electromagnetism, the Lagrangian density L(x) is a function of the potential A, the Maxwell field F, and the source density J. Expressed in exterior calculus notation, we postulate the generalized Lagrangian density to be For classical electromagnetism (r = 2, k = 1, n = 3), if the field is expressed as an antisymmetric tensor of rank 2 the factor before F · F becomes − 1 4 , see Remark 1. In contrast, for electrostatics (r = 1, k = 0, n = 3), the Lagrangian density is given by L = 1 2 E · E + ρφ, where E is the electric field, ρ the charge density, and φ is the opposite in sign of the usual electric potential, that is, While the Lagrangian in (52) leads to the generalized Maxwell Equations (50) and (51), as we shall see in the following section, it is not the most general Lagrangian associated to electromagnetism. Two terms that can be added to it respectively deal with the hypothetical mass of the photon, that is, the Proca term [4] (p. 107), [22] (Section 12.8), and a gauge-fixing term that appears in the context of quantization of the electromagnetic field [3] (Section II.7), [4] (Section 7.1). This general Lagrangian density for electromagnetism is now given by where m is the hypothetical photon mass and ξ is a parameter that determines the so-called R ξ gauge; for ξ = 1, we have the Feynman gauge, and in the limit ξ → 0, we have the Landau gauge.

Euler-Lagrange Equations
For Lagrangian densities such as (52) or (53), which are essentially quadratic forms in the field and/or its interior or exterior derivatives, evaluation of the vector derivatives is straightforward, as the derivative has the same form as that obtained in infinitesimal calculus for the derivative of a polynomial (31) and (32). For the Lagrangian density in (52), evaluation of the derivatives in the Euler-Lagrange Equation (47) give from which the Euler-Lagrange equations themselves (46), with s = r − 1, can be expressed as namely the generalized nonhomogenous Maxwell Equation (50) for arbitrary r, k, and n. The homogeneous Maxwell Equation (51) is also satisfied as a consequence of the definition of F = ∂ ∧ A.
The exterior algebraic formulation of the Lagrangian and the Euler-Lagrange equations brings the advantage of allowing for a more direct derivation of the Maxwell equations, since evaluation of the vector derivatives mimicks more closely the steps carried out in usual differential calculus to evaluate the derivatives.
The factor (−1) r−1 in the Lagrangian density is needed to compensate for the identical term (−1) r−1 that appears in the Euler-Lagrange Equation (47). An alternative way of writing the Lagrangian density, without this sign factor, would involve replacing one of the exterior derivatives ∂ ∧ A by a right exterior derivative A ∧ ∂, where the partial derivative operator is understood to act from the right on the potential. In this case, the skew commutativity of the wedge product, ∂ ∧ A = (−1) r−1 (A ∧ ∂) [14] (Section 2.2), cancels the sign in the Lagrangian density and results in a somewhat neater expression for it.
As for the Lagrangian density in (53), evaluation of the derivatives in the Euler-Lagrange Equation (47) give from which the Euler-Lagrange Equation (46) with the Proca and quantization R ξ -gauge terms become Using the relationship (34) in [15], we may rewrite (60) in an alternative form with a wave equation, which somewhat simplifies in the Feynman gauge, for which ξ = 1.

Dual Generalized Maxwell Equations
An interesting dual form of Maxwell equations is obtained by swapping the roles played by the interior and exterior derivatives in the Lagrangian density and the Maxwell equations themselves. Let the "potential"Ā and "source density"J be multivectors of grade s, and let us define a dual Maxwell fieldF of grade r = s − 1 byF = ∂Ā. The Lagrangian density is now given by where we used the relationship between left and right interior derivatives ∂Ā = (−1) s+1 (Ā ∂) to write (63). Direct evaluation of the Euler-Lagrange Equation (47), with r = s − 1, gives This nonhomogeneous "Maxwell" equation is complemented by a homogeneous equation ∂F = 0, itself a consequence of the definition ofF asF = ∂Ā.
As it happened with the generalized Maxwell equations, the exterior algebraic formulation of the Lagrangian and the Euler-Lagrange equations allows for a more direct derivation of the dual Maxwell equations. An interesting question, which we do not dwell upon as it lies beyond the scope of this paper, is whether the physics of the dual Maxwell equations is different from the usual Maxwell equations, or simply involves a transformation of the fields, potential, and source density, with no new phenomena. Along this direction, and leaving the details left as an exercise to the reader, it is relatively easy to verify that one obtains a wave equation relatingĀ andJ in a "Lorenz gauge" where ∂ ∧Ā = 0. Solutions to this wave equation have several independent degrees of freedom or polarizations. The number of these polarizations is k+n−2 r−1 , as for the standard Maxwell Equation [15] (Section 4.3); this number can be justified as the number of possible (r + 1)-vectors where two dimensions, one temporal and one spatial are fixed, and the remaining r + 1 − 2 = r − 1 indices have to be filled with k + n − 2 possible values. We also have a "Lorentz force" density f =JF such that a conservation law holds for the stress-energy-momentum tensor Tem of the field [15] (Appendix A.2), as for the usual Maxwell equations.  (4) and (19), the first term of the right-hand side of (36) is evaluated as where in (65), we wrote the components of ∂B and a, in (66), we computed the matrix product and removed the j index, and in (67), we carried out the dot product and removed the J index. In turn, the second term in the right-hand side of (36) can similarly be evaluated using the dot and times products in (16) and (19) Next, using again the definitions of dot and matrix product (4) and (17), the left-hand side of (36) becomes

A.2 Identity between Tensorial and Exterior Algebraic Euler-Lagrange Equations
Since both the exterior and interior derivatives are surjective linear functions of the tensor derivative, the respective vector derivatives of the Lagrangian density are related. Each component of the exterior and interior derivatives (21) and (22) is a scalar (affine) function of several distinct components of the tensor derivative. The Lagrangian density depends on the components of the tensor derivative only through these scalar functions. We thus need to compute the derivative of a function L g1(z), . . . , g ℓ (z) , where z stands for a vector with the ℓ ′ = (k + n) k+n s components of the tensor derivative, and (g1, . . . , g ℓ ) are the (differentiable) functions that give the components of the exterior (resp. interior) derivative from the tensor derivative, where ℓ = k+n s+1 (resp. ℓ = k+n s−1 ). By construction, a given z k = ∂jaJ appears only in one gi(z), the I component of either the exterior or the interior derivative. In the former case, I = j + J, in the latter case I = J \ j. .
Since the z k component appears only in one of the functions gi, the limit in (75) is the partial derivative of the Lagrangian density with respect to the kth component of the tensor derivative, for any k, that is, We now proceed to evaluate the vector derivative with respect to the exterior derivative. First, we have where the Ith component of the exterior derivative, (∂ ∧ a)I is the equivalent of gi(z) in (76). The equivalent of k is any pair of j and J ∈ Is such that I = j + J and the corresponding z k is ∂jaJ . The partial derivative ∂gi/∂z k in (76) is thus ∆jj σ(j, J), of value ±1, and we therefore have for any pair of i and J ∈ Is such that I = j + J that where j and J are any pair such that I = j + J. Now, taking the interior derivative of (79), we obtain for any j, J such that I = j + J, ∆jj ∆II σ(j, J)eI (80) = i∈I,I∈I s+1 :i∈I ∆ii∆II ∂i ∂L ∂(∂ia I\i ) σ(i, I \ i)σ(I \ i, i)e I\i , where we have selected j = i and, therefore, J = I \ i. We also note that σ(i, I \ i)σ(I \ i, i) = (−1) s . We now evaluate the vector derivative with respect to the interior derivative in an analogous manner, where j and J are any pair such that I = J \ j. Now, taking the exterior derivative of (82), we obtain, for any j, J such that I = J \ j, ∆II σ(J \ j, j)eI (83) = i∈I,I∈I s−1 :i / ∈I ∆ii∆II ∂i ∂L ∂(∂iai+I ) σ(I, i)σ(i, I)ei+I, where we have selected j = i and, therefore, J = i + I. We also note that σ(I, i)σ(i, I) = (−1) s−1 .
Putting (81) and (84), as well as the relationships between the product of permutation signatures, back into the righthand side of (48) yields the expression i∈I,I∈I s+1 :i∈I eI .
The two summations in (85) might be further combined in a single summation over I ∈ Is. The resulting expression coincides with the left-hand side of (48), which can be expanded using the computation in (40)