Linear Complementarity Problem (LCP)
January 19, 2026 · View on GitHub
Attribution: This content is derived from "Contact Handling for Articulated Rigid Bodies Using LCP" by Jie Tan, Kristin Siu, and C. Karen Liu. The original PDF is preserved at
docs/lcp.pdf.
Navigation: Index | Overview →
Definition
The Linear Complementarity Problem (LCP) is defined as:
Given and , find such that:
Note: Many references write the standard LCP as . DART uses the equivalent convention (i.e., ), matching the ODE-style form used by the constraint solver.
The complementarity condition means that for each index :
This can also be written component-wise as:
For each :
Equivalent Formulations
Minimum Map Reformulation
where the minimum is taken component-wise.
Nonlinear Complementarity Problem (NCP)
Variational Inequality (VI)
Find such that:
Quadratic Programming (QP) - When A is Symmetric PD
Problem Variants
Standard LCP
The basic form as defined above with unbounded variables constrained to be non-negative.
Boxed LCP (BLCP)
LCP with box constraints on variables:
Find such that:
For each :
- If , then
- If , then
- If , then
Typical bounds:
- Lower: (often or for friction)
- Upper: (often or for friction)
Mixed LCP (MLCP)
Combination of equality constraints and complementarity:
Find , such that:
LCP with Friction (FLCP)
Special BLCP where bounds depend on other variables:
For friction at contact :
where:
- is normal force
- is tangential friction force
- is friction coefficient
In DART, this coupling is represented using the findex array:
- For a tangential variable coupled to normal :
- Set
findex[i] = j - Store the coefficient in the box bounds:
lo[i] = -μ,hi[i] = +μ - The effective bounds are interpreted as
- Set
Applications in Physics-Based Simulation
1. Contact Mechanics
Unilateral Contact Constraints:
For each contact point :
where:
- = gap distance (signed distance function)
- = normal contact force
LCP Formulation: After time discretization and linearization:
represents the constraint-space residual. Complementarity ensures forces are zero when separated.
2. Friction Modeling
Coulomb Friction as BLCP:
For contact with normal force :
Discretized (pyramid approximation):
BLCP formulation:
3. Joint Limits
Joint Constraints:
For revolute joint with limits :
BLCP formulation:
Forces active only at limits.
4. Rigid Body Dynamics
Time-Stepping Scheme:
Velocity-level formulation:
where:
- = mass matrix
- , = velocities before/after contact
- = time step
- = contact Jacobian
- = contact impulses (LCP variable)
LCP emerges from non-penetration and friction constraints.
5. Fluid Simulation
Pressure Projection:
Incompressible flow with boundaries:
Discretized → LCP for pressure field.
Mathematical Properties
Existence and Uniqueness
Theorem: An LCP has a unique solution if is:
- Strictly Copositive: for all ,
- P-matrix: All principal minors are positive
- Symmetric Positive Definite (PD): for all
Common Cases:
- Contact mechanics: A is often symmetric PSD (positive semi-definite)
- Joint constraints may make A singular (PSD but not PD)
Solvability Classes
| Matrix Class | Solution Exists? | Solution Unique? | Solvable By |
|---|---|---|---|
| Symmetric PD | Always | Yes | All methods |
| Symmetric PSD | Sometimes | Sometimes | Pivoting, iterative |
| P-matrix | Always | Yes | Pivoting |
| Copositive | Sometimes | Sometimes | Depends on b |
| General | Sometimes | Sometimes | Trial and error |
Degeneracy
Strict Complementarity: For all , either OR (but not both zero)
Degeneracy: When for some
- Makes active set identification difficult
- Can slow convergence of iterative methods
- Pivoting methods may cycle
Complexity
Computational Complexity
- General LCP: NP-complete (worst case)
- Special cases (symmetric PD): Polynomial time
Practical Complexity
For physics simulation with contact points:
- Problem size: to $6n$ variables (normal + friction + bounds)
- Matrix structure: Often sparse ( non-zeros, small)
- Time discretization: Solve LCP every time step
Standard Forms
Cottle-Dantzig Form
Used in theoretical analysis and pivoting methods.
Physics Form
Direct from physics constraints.
Optimization Form (A symmetric PD)
KKT conditions → LCP
Relationship to Other Problems
Linear Programming (LP)
LP: subject to , can be reformulated as LCP.
Quadratic Programming (QP)
When is symmetric: LCP ↔ QP with non-negativity.
Optimization
KKT conditions of constrained optimization often lead to LCP/BLCP.
Game Theory
Nash equilibria in bimatrix games can be found by solving LCP.
Why LCPs Matter for DART
Core Use Cases
-
Contact Resolution
- Every contact point → LCP variables
- Friction cones → BLCP bounds
- Non-penetration → Complementarity
-
Constraint Satisfaction
- Joint limits → BLCP
- Motor constraints → MLCP
- Closed kinematic chains → MLCP
-
Interactive Simulation
- Real-time requires fast LCP solvers
- Trade-off: speed vs accuracy
- Iterative methods essential ( per iteration)
-
High-Fidelity Simulation
- Accurate contact forces need tight tolerances
- Newton methods or pivoting
- acceptable for off-line
Solver Requirements
| Requirement | Method Choice |
|---|---|
| Real-time (30+ FPS) | PGS, PSOR, BGS |
| High accuracy | Newton, Pivoting |
| Large scenes (>1000 contacts) | NNCG, PGS |
| Ill-conditioned | Pivoting, Interior Point |
| Parallel hardware | Jacobi, Red-Black GS |
Key Challenges
Numerical Challenges
- Ill-conditioning: Large mass ratios, thin objects
- Degeneracy: Multiple contacts at same point
- Sparsity: Must exploit for large problems
- Warm-starting: Critical for time-stepping
Modeling Challenges
- Friction cone discretization: Pyramid vs ellipse
- Time integration: Implicit vs explicit
- Constraint stabilization: Baumgarte, post-stabilization
- Regularization: Trade-off with physical accuracy
Implementation Challenges
- Matrix assembly: Efficient Jacobian computation
- Solver selection: Problem-dependent performance
- Parameter tuning: Tolerances, iterations, relaxation
- Robustness: Handling edge cases, degeneracies
Further Reading
Theory
- Cottle, Pang, Stone (1992): "The Linear Complementarity Problem" - Comprehensive reference
- Murty (1988): "Linear Complementarity, Linear and Nonlinear Programming" - Theoretical foundations
Physics-Based Animation
- Erleben et al. (2017): "Numerical Methods for Linear Complementarity Problems in Physics-Based Animation" - Direct application to simulation
- Baraff (1994): "Fast Contact Force Computation for Nonpenetrating Rigid Bodies" - Foundational paper
Optimization
- Nocedal & Wright (1999): "Numerical Optimization" - QP and NCP connections
- Ferris & Kanzow (2002): "Engineering and Economic Applications of Complementarity Problems" - Applied perspective