The Normal Equation is the closed-form solution to the linear least squares problem, obtained by setting the derivative of the mean squared error cost function to zero and solving the resulting linear system. It directly computes the optimal coefficient vector θ that minimizes the sum of squared residuals via the formula θ = (XᵀX)⁻¹Xᵀy, where X is the design matrix and y is the target vector.
Glossary
Normal Equation

What is the Normal Equation?
The Normal Equation provides a direct, analytical solution to the linear least squares problem, bypassing the need for iterative gradient descent.
This analytical method guarantees finding the global minimum for linear models without requiring iterative tuning of a learning rate or convergence monitoring. However, computing the inverse of the Gram matrix XᵀX has a computational complexity of O(n³), making it impractical for high-dimensional feature spaces where iterative methods like Stochastic Gradient Descent are preferred.
Frequently Asked Questions
Clear, direct answers to the most common questions about the Normal Equation and its application in solving linear least squares problems for coefficient estimation.
The Normal Equation is a closed-form analytical solution to the linear least squares problem that directly computes the optimal coefficient vector without iteration. It is derived by setting the gradient of the Mean Squared Error (MSE) cost function to zero and solving the resulting linear system. Mathematically, for a design matrix X and target vector y, the solution is θ = (XᵀX)⁻¹Xᵀy. The term "normal" refers to the geometric property that the residual error vector is orthogonal (normal) to the column space of X. This method provides the exact minimizer in a single computation, making it ideal for offline training and parameter extraction where the dataset is fixed and the number of features is manageable. However, the computational cost of inverting the XᵀX matrix scales as O(n³), where n is the number of parameters, limiting its practicality for high-dimensional or real-time adaptive systems.
Key Properties of the Normal Equation
The Normal Equation provides a direct, non-iterative solution to the linear least squares problem. Understanding its core properties is essential for determining when to use this batch method versus adaptive alternatives like LMS or RLS.
Closed-Form Solution
The Normal Equation solves for optimal coefficients θ̂ in a single step using the formula θ̂ = (XᵀX)⁻¹ Xᵀ y. Unlike gradient descent methods, there is no iteration, no learning rate to tune, and no convergence monitoring required. The solution is deterministic: given the same design matrix X and target vector y, the result is always identical. This makes it ideal for offline coefficient extraction where computational determinism is critical.
Computational Complexity
The computational cost is dominated by the matrix inversion of XᵀX, which is an (n × n) matrix where n is the number of model coefficients. Standard inversion requires O(n³) operations. For a memory polynomial predistorter with 50 coefficients, this is trivial. However, for models with thousands of parameters, the cubic scaling becomes prohibitive, making iterative methods like Stochastic Gradient Descent or Recursive Least Squares more practical.
Numerical Stability Requirements
The Normal Equation explicitly computes (XᵀX)⁻¹, which squares the condition number of the original design matrix X. If X is nearly rank-deficient—common with highly correlated basis functions in Volterra series—the inversion becomes numerically unstable. In such cases, more robust factorization methods are preferred:
- QR Decomposition: Solves Rx = Qᵀy without forming XᵀX
- Singular Value Decomposition (SVD) : Handles rank deficiency by discarding near-zero singular values
Optimality Under Gauss-Markov Assumptions
When the noise in the observed data is zero-mean, uncorrelated (white), and has constant variance (homoscedastic), the Normal Equation yields the Best Linear Unbiased Estimator (BLUE) . This is the Gauss-Markov theorem. In power amplifier modeling, measurement noise from vector signal analyzers typically satisfies these conditions, making the Normal Equation the statistically optimal batch estimator for extracting Memory Polynomial coefficients.
No Hyperparameter Tuning
Unlike iterative algorithms, the Normal Equation has no step size (μ), no forgetting factor (λ), and no momentum parameter. This eliminates the need for hyperparameter sweeps and convergence analysis. The trade-off is the inability to track time-varying systems. For static PA behavioral models extracted in a controlled lab environment, this zero-tuning property significantly reduces engineering time compared to tuning an LMS or NLMS algorithm.
Regularization for Ill-Conditioned Problems
When XᵀX is ill-conditioned, a regularization parameter (δ) is added to the diagonal: θ̂ = (XᵀX + δI)⁻¹ Xᵀ y. This is known as ridge regression or Tikhonov regularization. The parameter δ introduces a small bias but dramatically reduces variance, preventing the coefficient vector from exploding due to near-singularity. This is essential when extracting high-order polynomial models where basis functions become highly correlated.
Normal Equation vs. Iterative Methods
A comparison of the closed-form Normal Equation solution against gradient-based and recursive iterative methods for linear least squares coefficient estimation in digital predistortion.
| Feature | Normal Equation | Stochastic Gradient Descent | Recursive Least Squares |
|---|---|---|---|
Solution Type | Closed-form (batch) | Iterative (stochastic) | Iterative (recursive) |
Computational Complexity | O(n³) for matrix inversion | O(n²) per iteration | O(n²) per iteration |
Convergence Speed | One-step (instantaneous) | Slow, depends on step size | Fast, typically < 2n iterations |
Online Adaptation | |||
Numerical Stability | Poor for ill-conditioned matrices | Robust with proper step size | Excellent (QR-RLS variant) |
Memory Requirements | High (stores full matrix) | Low (gradient vector only) | Moderate (correlation matrix) |
Tracking Time-Varying Systems | |||
Regularization Integration | Direct (add λI to XᵀX) | Implicit via early stopping | Explicit via forgetting factor |
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
Core mathematical techniques and algorithmic variants that underpin the Normal Equation and its application in adaptive predistortion systems.
Wiener-Hopf Equation
The theoretical foundation of the Normal Equation. It defines the optimal weight vector for a linear filter as w = R⁻¹p, where R is the autocorrelation matrix of the input and p is the cross-correlation vector between the input and desired signal. Solving this directly yields the minimum Mean Squared Error (MSE).
Least Squares (LS)
A batch estimation method that computes the coefficient vector by minimizing the sum of squared errors over a block of data. The Normal Equation XᵀX β = Xᵀy is the direct algebraic solution. LS is ideal for offline training where a complete dataset is available, providing the optimal unbiased estimate under white Gaussian noise.
Recursive Least Squares (RLS)
An adaptive implementation that recursively updates the inverse correlation matrix using the matrix inversion lemma, avoiding costly batch inversion. RLS achieves an order of magnitude faster convergence rate than gradient-based methods like LMS, making it suitable for tracking time-varying amplifier characteristics in online training scenarios.
QR Decomposition (QRD)
A numerically stable alternative to directly solving the Normal Equation. It decomposes the data matrix X into an orthogonal matrix Q and upper triangular matrix R, then solves Rβ = Qᵀy via back-substitution. This avoids squaring the condition number, which occurs when forming XᵀX, making it essential for ill-conditioned problems.
Regularization Parameter
A scalar λ added to the diagonal of XᵀX to form (XᵀX + λI)β = Xᵀy. This technique, known as ridge regression or Tikhonov regularization, combats overfitting and improves numerical stability when the data matrix is ill-conditioned. It introduces a controlled bias to dramatically reduce variance in the coefficient estimates.
Singular Value Decomposition (SVD)
The most robust method for solving linear systems. It factorizes X = UΣVᵀ, revealing the full eigenspectrum. SVD allows direct analysis of the condition number and enables truncated SVD solutions that discard small singular values, effectively performing regularization without an explicit parameter. Critical for diagnosing ill-conditioning in wideband DPD data matrices.

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