The Algebraic Riccati Equation (ARE) is a matrix equation whose solution provides the optimal state feedback gain for the Linear Quadratic Regulator (LQR), a cornerstone of optimal control. It arises from solving the infinite-horizon, continuous-time LQR problem, where the goal is to minimize a quadratic cost function that penalizes state deviation and control effort. The ARE's solution, a symmetric positive-definite matrix P, directly yields the stabilizing control law u = -Kx, where K = R⁻¹BᵀP. This equation is algebraic, meaning it is time-invariant, in contrast to its differential counterpart, the Differential Riccati Equation (DRE).
Glossary
Algebraic Riccati Equation (ARE)

What is Algebraic Riccati Equation (ARE)?
The Algebraic Riccati Equation (ARE) is a foundational matrix equation in optimal control theory whose solution provides the optimal state feedback gain for the Linear Quadratic Regulator (LQR).
In Model Predictive Control (MPC), the ARE is crucial for stability analysis and terminal cost design. For Linear MPC, using the ARE solution as a terminal cost function and enforcing a terminal constraint derived from it can guarantee nominal closed-loop stability. This technique, known as the dual-mode or infinite-horizon MPC approach, approximates an infinite prediction horizon with a finite one. The equation is intimately linked to the Hamiltonian matrix and its stabilizing invariant subspace, with numerical solutions typically computed via eigenvector decomposition or iterative methods like the Kleinman algorithm.
Key Characteristics of the Algebraic Riccati Equation
The Algebraic Riccati Equation (ARE) is the cornerstone of optimal linear feedback control. Its solution provides the optimal gain matrix for the Linear Quadratic Regulator (LQR) and is fundamental to stability guarantees in Linear MPC.
Core Matrix Equation
The Algebraic Riccati Equation is a nonlinear matrix equation, typically expressed in its continuous-time form as:
AᵀP + PA - PBR⁻¹BᵀP + Q = 0
Where:
- P is the unknown symmetric, positive-definite solution matrix.
- A and B are the system matrices from the linear state-space model
ẋ = Ax + Bu. - Q (state cost) and R (input cost) are symmetric weighting matrices, with Q ≥ 0 and R > 0.
Its discrete-time counterpart is the Discrete-Time Algebraic Riccati Equation (DARE).
Link to Optimal Control (LQR)
The primary application of the ARE is solving the Infinite-Horizon Linear Quadratic Regulator (LQR) problem. The solution matrix P directly yields the optimal state-feedback control law:
u*(t) = -K x(t) where K = R⁻¹BᵀP
This feedback law minimizes the quadratic cost function:
J = ∫₀∞ (xᵀQx + uᵀRu) dt
The resulting controller guarantees asymptotic stability for stabilizable and detectable systems, making the ARE solution synonymous with optimal, stabilizing linear feedback.
Stability & The Hamiltonian Matrix
Solving the ARE is intimately connected to analyzing a Hamiltonian matrix:
H = [ A, -BR⁻¹Bᵀ; -Q, -Aᵀ ]
The stable solution P corresponds to the stabilizing invariant subspace associated with the eigenvalues of H that lie in the open left-half complex plane. Numerical solvers (like the Schur vector method) compute this subspace to find P. This link ensures the optimal controller places the closed-loop system poles optimally for the given cost weights Q and R.
Role in Model Predictive Control (MPC)
In Linear MPC, the ARE solution is critical for two principal design elements:
- Terminal Cost: For stability, a common approach is to set the terminal cost in the MPC finite-horizon problem as
xᵀ_N P x_N, where P is the ARE solution. This approximates the cost-to-go from the end of the horizon to infinity. - Terminal Constraint Set: The ARE solution helps define a terminal invariant set (often an ellipsoid) where the LQR controller is feasible and stabilizing. Enforcing that the final predicted state lies in this set guarantees closed-loop stability.
This bridges finite-horizon MPC optimization with infinite-horizon optimality and stability guarantees.
Existence and Uniqueness of Solutions
A unique, stabilizing solution to the ARE is not guaranteed for all systems. Key conditions include:
- Stabilizability: The pair (A, B) must be stabilizable. This ensures a control law exists that can stabilize the system.
- Detectability: The pair (A, Q) must be detectable. This ensures all unstable states are penalized by the cost function. If Q is positive definite, this condition is satisfied.
When these conditions hold, there exists a unique positive semidefinite solution P that stabilizes the closed-loop system (A - BK is Hurwitz).
Numerical Solution Methods
Solving the ARE is a fundamental numerical task in control design. Standard methods include:
- Schur Vector Method: The most reliable. It uses the QZ algorithm or Schur decomposition on the Hamiltonian matrix to find its stable invariant subspace.
- Iterative Methods: The Kleinman algorithm (a Newton-type method) iteratively solves a sequence of Lyapunov equations for rapid convergence.
- Software Tools: Solvers are built into control design suites (MATLAB's
care,dare), numerical libraries (SciPy), and MPC-specific toolkits (ACADO Toolkit).
Robust numerical solution is essential for implementing LQR and designing stable MPC laws.
How the Algebraic Riccati Equation Works in Control Design
The Algebraic Riccati Equation (ARE) is a cornerstone of optimal control theory, providing the mathematical foundation for the Linear Quadratic Regulator (LQR) and influencing stability guarantees in Model Predictive Control (MPC).
The Algebraic Riccati Equation (ARE) is a nonlinear matrix equation whose symmetric, positive-definite solution provides the optimal, constant state-feedback gain for the Linear Quadratic Regulator (LQR), an infinite-horizon optimal controller. For a linear time-invariant system, the ARE balances the cost of state deviation against control effort, yielding a gain matrix that minimizes a quadratic cost function and guarantees closed-loop stability. Its solution is central to optimal control theory and serves as a critical tool for analyzing and designing stabilizing controllers.
In Model Predictive Control (MPC), the ARE's solution is often used to design the terminal cost and terminal constraint set, which are key ingredients for proving nominal closed-loop stability. By approximating the infinite-horizon LQR cost-to-go, the terminal penalty ensures the finite-horizon MPC optimization yields a stabilizing policy. This deep connection positions the ARE not merely as an LQR artifact but as a fundamental bridge between infinite-horizon optimality and the practical, constrained optimization of receding horizon control.
Algebraic Riccati Equation vs. Related Concepts
A technical comparison of the Algebraic Riccati Equation (ARE) with other fundamental matrix equations and stability tools in optimal control and Model Predictive Control (MPC).
| Feature / Property | Algebraic Riccati Equation (ARE) | Lyapunov Equation | Differential Riccati Equation (DRE) | Hamiltonian Matrix |
|---|---|---|---|---|
Primary Mathematical Form | AᵀP + PA - PBR⁻¹BᵀP + Q = 0 | AᵀP + PA + Q = 0 | Ṗ(t) + AᵀP(t) + P(t)A - P(t)BR⁻¹BᵀP(t) + Q = 0 | H = [[A, -BR⁻¹Bᵀ], [-Q, -Aᵀ]] |
Equation Type | Nonlinear matrix equation (quadratic in P) | Linear matrix equation | Nonlinear matrix differential equation | Constant matrix (defines a linear system) |
Typical Solution Method | Iterative algorithms (e.g., Kleinman), Hamiltonian eigenstructure | Direct linear solve (e.g., Bartels-Stewart) | Numerical integration (backwards in time) | Eigenvalue decomposition |
Primary Control Application | Infinite-horizon Linear Quadratic Regulator (LQR) optimal gain | Stability analysis (Lyapunov's direct method) | Finite-horizon Linear Quadratic (LQ) optimal control | Analysis and solution of the ARE/DRE |
Role in MPC Design | Provides terminal cost matrix P∞ for stability guarantees | Used to prove stability of terminal region | Solves finite-horizon problem within MPC prediction window | Used to compute the ARE solution for the unconstrained LQR |
Temporal Domain | Steady-state (infinite time, t → ∞) | Steady-state | Time-varying (finite horizon, t ∈ [0, T]) | N/A (defines a system) |
Key Output | Constant positive-definite matrix P (cost-to-go) | Positive-definite matrix P (Lyapunov function) | Time-varying matrix P(t) (cost-to-go) | Eigenvalues, eigenvectors used to construct P |
Computational Complexity | O(n³) for dense matrices | O(n³) for dense matrices | O(n³ * timesteps) for integration | O(n³) for eigenvalue decomposition |
Constraint Handling | None (unconstrained LQR only) | None | None (unconstrained LQ only) | None |
Connection to ARE | N/A (self) | Special case of ARE with B = 0 | Dynamic version; ARE is its steady-state solution | Eigenvectors of stable invariant subspace yield ARE solution P |
Frequently Asked Questions
The Algebraic Riccati Equation (ARE) is a cornerstone of optimal control theory, providing the key to designing stabilizing, optimal feedback controllers for linear systems. This FAQ addresses its core mechanics, applications, and relationship to advanced control methods like Model Predictive Control (MPC).
The Algebraic Riccati Equation (ARE) is a fundamental matrix equation in optimal control theory whose solution provides the optimal, constant state-feedback gain for an infinite-horizon Linear Quadratic Regulator (LQR) problem. For a continuous-time linear time-invariant system, the equation takes the canonical form A'P + PA - PBR^{-1}B'P + Q = 0, where P is the unknown symmetric positive-definite matrix, A and B are the system matrices, and Q and R are the state and input weighting matrices from the quadratic cost function. Solving this equation for P yields the optimal feedback law u = -Kx, where the gain K = R^{-1}B'P. This controller minimizes a cost function balancing state deviation and control effort over an infinite time horizon, guaranteeing closed-loop stability under standard conditions.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The Algebraic Riccati Equation is a cornerstone of optimal control theory. Its solution defines the optimal feedback gain for the Linear Quadratic Regulator (LQR) and is fundamental to stability guarantees in Linear Model Predictive Control (MPC).
Linear Quadratic Regulator (LQR)
The Linear Quadratic Regulator (LQR) is the foundational optimal feedback controller for linear time-invariant systems. Its design solves an infinite-horizon optimal control problem, minimizing a quadratic cost function that penalizes both state deviation and control effort.
- Key Relationship to ARE: The optimal LQR feedback gain matrix K is computed directly from the solution P of the Algebraic Riccati Equation: K = R⁻¹BᵀP, where R is the control penalty matrix and B is the input matrix.
- Role in MPC: The LQR solution often provides the terminal cost matrix in finite-horizon MPC formulations, a critical element for proving closed-loop stability.
Optimal Control Problem (OCP)
An Optimal Control Problem (OCP) is the core mathematical formulation that MPC solves online. It defines the objective of finding a control input sequence that minimizes a cost function subject to system dynamics and constraints over a future horizon.
- Finite vs. Infinite Horizon: The ARE arises from solving the infinite-horizon, unconstrained version of the Linear Quadratic (LQ) OCP. This analytical solution provides a benchmark and theoretical foundation for the more complex, constrained finite-horizon problems solved in MPC.
- Components: A standard OCP is defined by: 1) A dynamic model (e.g., ẋ = Ax + Bu), 2) A cost function (e.g., J = ∫ (xᵀQx + uᵀRu) dt), and 3) A set of state and input constraints.
Terminal Cost & Constraint
Terminal cost and terminal constraint are design techniques in finite-horizon MPC used to ensure closed-loop stability by approximating the properties of the infinite-horizon solution.
- Terminal Cost: Often chosen as a quadratic form V_f(x) = xᵀPx, where P is the solution to the ARE. This penalizes the state at the end of the prediction horizon, encouraging the controller to steer the system toward a region where the infinite-horizon optimal controller (LQR) would take over.
- Terminal Constraint: May require the final predicted state to lie within a terminal set, which is often designed to be positively invariant under the LQR feedback law derived from the ARE.
Lyapunov Function
A Lyapunov function is a scalar, energy-like function used to prove the stability of an equilibrium point of a dynamical system. For a stable system, this function decreases over time.
- Connection to ARE: For the closed-loop LQR system (u = -Kx), the optimal cost-to-go V(x) = xᵀPx (where P solves the ARE) serves as a quadratic Lyapunov function. This provides a formal proof of global asymptotic stability for the unconstrained LQ problem.
- Role in MPC Stability Proofs: In MPC, the optimal value function of the solved OCP is often used as a candidate Lyapunov function. The terminal cost derived from the ARE solution is crucial in showing that this value function decreases from one time step to the next.
Riccati Differential Equation (RDE)
The Riccati Differential Equation (RDE) is the time-varying counterpart to the Algebraic Riccati Equation. It is a matrix differential equation that must be solved backward in time over a finite horizon.
- Context: The RDE arises in the solution of the finite-horizon Linear Quadratic (LQ) optimal control problem, where the terminal time is fixed.
- Steady-State Solution: As the horizon extends to infinity, the solution to the RDE converges to a constant matrix, which is the unique stabilizing solution of the Algebraic Riccati Equation (ARE). This illustrates how the finite-horizon LQ controller approaches the infinite-horizon LQR controller.
Kalman Filter (Duality)
The Kalman Filter is the optimal state estimator for linear systems with Gaussian noise. A profound duality principle exists between optimal estimation (Kalman Filter) and optimal control (LQR).
- Dual Riccati Equation: The Kalman Filter gain is computed by solving an Algebraic Riccati Equation that is the dual of the control ARE. Where the control ARE uses system matrices (A, B) and cost weights (Q, R), the estimation ARE uses the transposed dynamics (Aᵀ, Cᵀ) and noise covariance matrices.
- Unified Framework: This duality means that solving the ARE is a fundamental skill for both optimal feedback control and optimal state estimation, two pillars of modern autonomous systems.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us