# Nakafa Framework: LLM
URL: /en/subject/university/bachelor/ai-ds/linear-methods/orthogonal-polynomials
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/university/bachelor/ai-ds/linear-methods/orthogonal-polynomials/en.mdx
Output docs content for large language models.
---
export const metadata = {
    title: "Orthogonal Polynomials",
    description: "Master Chebyshev and Legendre polynomials with weighted scalar products, Gram-Schmidt process, and Gauss approximation for numerical analysis.",
    authors: [{ name: "Nabil Akbarazzima Fatih" }],
    date: "07/15/2025",
    subject: "Linear Methods of AI",
};
## Weighted Scalar Product
In numerical analysis, we often need to measure the difference between two functions using the maximum norm. This norm is defined as:
In general, the maximum norm can become very large, especially near the endpoints of the interval where large errors often occur. Imagine measuring the height of a mountain only from its highest peak without considering the slope of its sides. 
To address this problem, we can use a weighted scalar product that gives different emphasis to each part of the interval:
with the weight function:
This weight function provides stronger emphasis on the interval endpoints, allowing us to suppress large errors that typically occur in those regions.
## Orthogonalization and Chebyshev Polynomials
When we orthogonalize the monomial basis  with respect to this weighted scalar product, we obtain orthogonal polynomials  that satisfy a two-level recurrence relation. This process is like rearranging building blocks so that each floor stands perfectly perpendicular to the others:
The norm of these polynomials is:
If we perform normalization at , we obtain the famous Chebyshev polynomials:
This trigonometric form shows that Chebyshev polynomials are essentially transformations of cosine functions adapted for the interval .
There exists a theorem stating that two-way recurrence relations hold generally for polynomials derived from monomial bases in the space  with certain symmetry properties. The scalar product satisfies the relation:
for all polynomials .
## Gram-Schmidt Process
Through the Gram-Schmidt orthogonalization process from the basis , we obtain orthogonal polynomials  with . This process is like building a structural framework where each beam is positioned based on the previous beam with accurate calculations:
with coefficients:
The orthonormal polynomials are then obtained through:
## Legendre Polynomials
For orthonormalization of the basis  with respect to the standard scalar product:
we obtain polynomials related to Legendre polynomials:
where  are Legendre polynomials defined through a two-level recurrence relation.
The Legendre polynomials themselves are defined as:
With respect to the standard scalar product, Legendre polynomials produce an orthonormal system  with  that satisfies:
## Transformation to Different Intervals
When we have another approximation interval  different from the standard interval, we perform a linear variable substitution. This process is like changing the scale on a map from one region to another while maintaining the correct proportions:
Then the differential becomes:
On the interval  there exist polynomials  with  expressed as:
### Verification of Orthonormal Properties
We can verify that the orthonormal properties remain valid after transformation:
With substitution, we obtain:
Thus:
## Gauss Approximation
In Gauss approximation with the scalar product:
this method provides a very important foundation in numerical analysis. The orthogonal polynomials we have studied become the fundamental basis for developing efficient Gauss quadrature methods for various computational applications that require function approximation with high accuracy.