Eritque Arcus Math Notes

Home

❯

NumericalAnalysis

❯

CH3

❯

normal equation

normal equation

Mar 06, 20251 min read

Definition

Solution is

x=(ATA)−1ATb

If (ATA)−1 such inverse not exists, we need to use x≈A+b from pseudo inverse (Moore-Penrose Inverse) to solve it.

Example of solving polynomial

f(x)=c0​+c1​x+c2​x2+c3​x3

Given vector x and f as input and output, we want to find c coefficients.

  1. build Vandermonde matrix
  2. Solve it by normal equation / pseudo inverse (Moore-Penrose Inverse)
# build Vandermonde matrix
A = np.vander(x, 4, True)
c = la.solve(A.T @ f, A.T @ A)

Graph View

  • Definition
  • Example of solving polynomial

Backlinks

  • normal equation
  • pseudo inverse (Moore-Penrose Inverse)
  • readme

Created with Quartz v4.5.0 © 2025

  • GitHub
  • Author
  • Licensed under CC BY-SA 4.0