section_path: Generalized/Lagrangian mechanics
section_name: Lagrangian mechanics
paragraph_text: Lagrangian mechanics
  
  In Lagrangian mechanics, a Lagrangian is defined as the difference between the kinetic energy T and the potential energy V:
  
  L = T − V. {\displaystyle {\mathcal {L}}=T-V\,.}
  
  If the generalized coordinates are represented as a vector q = (q, q,..., q) and time differentiation is represented by a dot over the variable, then the equations of motion (known as the Lagrange or Euler–Lagrange equations) are a set of N equations:
  
  d d t (∂ L ∂ q ˙ j) − ∂ L ∂ q j = 0. {\displaystyle {\frac {\text{d}}{{\text{d}}t}}\left({\frac {\partial {\mathcal {L}}}{\partial {\dot {q}}_{j}}}\right)-{\frac {\partial {\mathcal {L}}}{\partial q_{j}}}=0\,.}
  
  If a coordinate q is not a Cartesian coordinate, the associated generalized momentum component p does not necessarily have the dimensions of linear momentum. Even if q is a Cartesian coordinate, p will not be the same as the mechanical momentum if the potential depends on velocity. Some sources represent the kinematic momentum by the symbol Π.
  
  In this mathematical framework, a generalized momentum is associated with the generalized coordinates. Its components are defined as
  
  p j = ∂ L ∂ q ˙ j. {\displaystyle p_{j}={\frac {\partial {\mathcal {L}}}{\partial {\dot {q}}_{j}}}\,.}
  
  Each component p is said to be the conjugate momentum for the coordinate q.
  
  Now if a given coordinate q does not appear in the Lagrangian (although its time derivative might appear), then p is constant. This is the generalization of the conservation of momentum.
  
  Even if the generalized coordinates are just the ordinary spatial coordinates, the conjugate momenta are not necessarily the ordinary momentum coordinates. An example is found in the section on electromagnetism.