多項式の線形代数に関するノート
実数係数の多項式の集合P_n(R)における線形代数の基礎概念とその応用について解説しています。
キーポイント
実数係数の多項式の集合P_n(ℝ)がベクトル空間を形成することを、ベクトル空間の公理を確認しながら証明している
多項式の線形独立性、スパン、基底の概念を説明し、特に単項式基底{1, x, x^2, ..., x^n}がP_n(ℝ)の基底であることを示している
任意の多項式の集合が基底であるかどうかを線形代数の手法で確認する方法について、具体的な例を用いて解説している
影響分析・編集コメントを表示
影響分析
この記事は線形代数の基礎概念を多項式に適用する教育的な内容であり、AI/テクノロジーニュースとしての即時的な影響は限定的である。しかし、機械学習の数学的基礎を理解するための参考資料としての価値はある。
編集コメント
AI業界の著名人による数学基礎の解説記事だが、新規性や即時的な技術進展はなく、教育資料としての位置付けである。
我々は、次数が n 以下の実数係数多項式の集合 P_n(\mathbb{R}) を扱う。このような多項式は、以下のように n+1 個のスカラー係数 a_i を用いて表現できる。
集合 P_n(\mathbb{R}) は、多項式の加法とスカラー倍とともにベクトル空間を形成する。証明として、ベクトル空間の公理がどのように満たされるかを確認しよう。説明のために、p(x), q(x), r(x) を集合 P_n(\mathbb{R}) からの任意の多項式とする。同様に、a と b は
内の任意のスカラーとする。
ベクトル加法の結合性:
多項式の加法は結合的であるため、これは自明である[1]。同様の理由で、交換性も自明である。
ベクトル加法の交換性:
ベクトル加法の単位元:
零多項式 0 が単位元として機能する。\forall p(x)\in P_n(\mathbb{R}) に対して、0 + p(x) = p(x) が成り立つ。
ベクトル加法の逆元:
各 p(x) に対して、q(x)=-p(x) を加法逆元として用いることができる。なぜなら p(x)+q(x)=0 だからである。
スカラー倍の単位元:
スカラー 1 がスカラー倍の単位元として機能する。各 p(x) に対して、1\cdot p(x)=p(x) が真である。
スカラー倍の結合性:
任意の二つのスカラー a と b に対して:
ベクトル加法に対するスカラー倍の分配性:
任意の p(x), q(x) とスカラー a に対して:
スカラー加法に対するスカラー倍の分配性:
任意のスカラー a, b と多項式 p(x) に対して:
線形独立性、張る空間、基底
P_n(\mathbb{R}) 内の多項式がベクトル空間を形成することを示したので、その上にさらに線形代数の定義を構築できる。
k 個の多項式 p_k(x)\in P_n(\mathbb{R}) の集合が線形独立であるとは、
が a_i=0 \quad \forall i を意味するときに言う。言い換えれば、ゼロベクトルをもたらす線形結合は、すべての係数が 0 の場合のみである。
例として、P_n(\mathbb{R}) 内の多項式の基本的な構成要素である集合 \{1, x, x^2, \dots x^n\} について議論しよう。これらは線形独立である。なぜなら、
が真となるのは、すべての係数 a_i=0 である零多項式の場合のみだからである。これは多項式の定義そのものから来ている。さらに、この集合は P_n(\mathbb{R}) 全体を張る。なぜなら、すべての多項式は(定義により)\{1, x, x^2, \dots x^n\} の線形結合として表現できるからである。
これらの基本多項式が線形独立であり、ベクトル空間全体を張ることを示したので、これらはこの空間の基底である。実際、この集合には特別な名前がある:単項式基底(なぜなら単項式は単一の項を持つ多項式だからである)。
任意の多項式集合が基底かどうかを確認する
ある多項式の集合があり、これらが P_n(\mathbb{R}) の基底を形成するかどうかを知りたいとしよう。どうすればよいか?
考え方は、他の任意のベクトル空間に対して行うのと同じように線形代数を用いることである。具体的な例を用いて説明しよう:
集合 Q は P_n(\mathbb{R}) の基底か?まず、Q の要素が線形独立かどうかを確認することから始める。次のように書く:
再編成することで、これを次のように変形できる:
これが真であるためには、各単項式の係数がゼロでなければならない。数学的に:
行列形式で:
この行列を行階段形に簡約することで、これを解く方法はわかっている。この特定の行列の簡約行階段形が単位行列 I であることは容易にわかる。したがって、この方程式系には唯一の解 a_i=0 \quad \forall i が存在する[2]。
集合 Q が線形独立であることを示した。次に、これが空間 P_n(\mathbb{R}) を張ることを示そう。次の式を分析したい:
そして、任意の
,
, \gamma に対してこれを満たす係数 a_i を見つけたい。前と同じように、左辺を再編成して進める:
そして、
の各べき乗の係数をそれぞれ等置する:
これを行列形式に変換すると、係数の行列は前と全く同じになる。したがって、唯一の解が存在することがわかる。そして、行列を I に並べ替えることで、解は右辺に現れる。実際の解が何であるかは、今のところ、それが存在し唯一である限り重要ではない。Q が空間を張ることを示した!
集合 Q は線形独立であり、P_n(\mathbb{R}) を張るので、これは空間の基底である。
ヒルベルト空間に関する投稿で、関数の内積について議論した。さて、多項式は関数なので、積分を用いて次のように内積を定義できる[3]:
ここで、境界 a と b は任意であり、無限でもよい。積分を扱うときはいつも収束が心配になる。ヒルベルト空間に関する私の投稿では、L^2 - 二乗可積分関数についてのみ話した。しかし、ほとんどの多項式は二乗可積分ではない。したがって、次のいずれかを用いてこれを制限できる:
内積の積分が収束することを確実にする特別な重み関数 w(x) を用いる。
積分の境界を有限に設定し、w(x)=1 と設定する。
後者を用いて、境界を範囲 [-1,1] に制限し、w(x)=1 と設定しよう。次の内積を得る:
これが内積空間の条件を満たすか確認しよう。
共役対称性:
実数乗算は可換なので、次のように書ける:
ここでは実数を扱っているので、複素共役は無視して安全である。
第一引数に関する線形性:
p_1,p_2,q\in P_n(\mathbb{R}) と a,b\in \mathbb{R} とする。次のことを示したい:
内積の定義を用いて左辺を展開する:
結果は a\langle p_1,q\rangle +b\langle p_2,q\rangle と等価である。
正定値性:
非ゼロの p\in P_n(\mathbb{R}) に対して、\langle p, p\rangle > 0 であることを示したい。まず第一に、すべての
に対して p(x)^2\geq0 なので、次のことは真である:
しかし、結果が 0 の場合はどうか?さて、
としよう。p(x)^2 は非負関数なので、これは非負関数の積分が結局 0 になることを意味する。しかし、p(x) は多項式なので連続であり、p(x)^2 も連続である。連続な非負関数の積分が 0 ならば、関数自体が 0 であることを意味する。もしどこかで非ゼロであれば、積分も必然的に正でなければならない。
\langle p, p\rangle=0 となるのは p が零多項式の場合のみであることを証明した。正定値性の条件は満たされている。
結論として、P_n(\mathbb{R}) と定義した内積は、内積空間を形成する。
内積が定義されたので、多項式上の直交性を定義できる:二つの多項式 p, q が(我々の内積に関して)直交するのは、
のとき、かつそのときに限る。
予想に反して[4]、単項式基底の多項式は、我々の内積の定義を用いると直交しない。
例えば、1 と x^2 の内積を計算する:
我々の内積を用いて直交する他の多項式の集合が存在する。例えば、ルジャンドル多項式がそうである。しかし、これは別の投稿の話題である。
これらのノートでは、これ以上深く立ち入らない基本的な代数のレベルがある。a_i x^i + a_j x^j のようなものを b_i x^i + b_j x^j に加えるには、任意の
と j に対して
の各べき乗を別々に加えればよい、などとさらに分解して言うこともできるが、それは自明のこととして受け入れよう。
明らかに、この特定の方程式系は行列なしでも非常に簡単に解ける。ただ、より一般的なアプローチを実演したいだけである。線形方程式系が得られれば、線形代数の道具箱全体を自由に使える。例えば、行列式を確認してそれが非ゼロであることを見ることもできた。それは正方行列が可逆であり、この場合唯一の解を持つことを意味する。
原文を表示
We’ll be working with the set P_n(\mathbb{R}), real polynomials of degree \leq n. Such polynomials can be expressed using n+1 scalar coefficients a_i as follows:
The set P_n(\mathbb{R}), along with addition of polynomials and scalar multiplication form a vector space. As a proof, let’s review how the vector space axioms are satisfied. We’ll use p(x), q(x) and r(x) as arbitrary polynomials from the set P_n(\mathbb{R}) for the demonstration. Similarly, a and b are arbitrary scalars in
.
Associativity of vector addition:
This is trivial because addition of polynomials is associative [1]. Commutativity is similarly trivial, for the same reason:
Commutativity of vector addition:
Identity element of vector addition:
The zero polynomial 0 serves as an identity element. \forall p(x)\in P_n(\mathbb{R}), we have 0 + p(x) = p(x).
Inverse element of vector addition:
For each p(x), we can use q(x)=-p(x) as the additive inverse, because p(x)+q(x)=0.
Identity element of scalar multiplication
The scalar 1 serves as an identity element for scalar multiplication. For each p(x), it’s true that 1\cdot p(x)=p(x).
Associativity of scalar multiplication:
For any two scalars a and b:
Distributivity of scalar multiplication over vector addition:
For any p(x), q(x) and scalar a:
Distributivity of scalar multiplication over scalar addition:
For any scalars a and b and polynomial p(x):
Linear independence, span and basis
Since we’ve shown that polynomials in P_n(\mathbb{R}) form a vector space, we can now build additional linear algebraic definitions on top of that.
A set of k polynomials p_k(x)\in P_n(\mathbb{R}) is said to be linearly independent if
implies a_i=0 \quad \forall i. In words, the only linear combination resulting in the zero vector is when all coefficients are 0.
As an example, let’s discuss the fundamental building blocks of polynomials in P_n(\mathbb{R}): the set \{1, x, x^2, \dots x^n\}. These are linearly independent because:
is true only for zero polynomial, in which all the coefficients a_i=0. This comes from the very definition of polynomials. Moreover, this set spans the entire P_n(\mathbb{R}) because every polynomial can be (by definition) expressed as a linear combination of \{1, x, x^2, \dots x^n\}.
Since we’ve shown these basic polynomials are linearly independent and span the entire vector space, they are a basis for the space. In fact, this set has a special name: the monomial basis (because a monomial is a polynomial with a single term).
Checking if an arbitrary set of polynomials is a basis
Suppose we have some set polynomials, and we want to know if these form a basis for P_n(\mathbb{R}). How do we go about it?
The idea is using linear algebra the same way we do for any other vector space. Let’s use a concrete example to demonstrate:
Is the set Q a basis for P_n(\mathbb{R})? We’ll start by checking whether the members of Q are linearly independent. Write:
By regrouping, we can turn this into:
For this to be true, the coefficient of each monomial has to be zero; mathematically:
In matrix form:
We know how to solve this, by reducing the matrix into row-echelon form. It’s easy to see that the reduced row-echelon form of this specific matrix is I, the identity matrix. Therefore, this set of equations has a single solution: a_i=0 \quad \forall i [2].
We’ve shown that the set Q is linearly independent. Now let’s show that it spans the space P_n(\mathbb{R}). We want to analyze:
And find the coefficients a_i that satisfy this for any arbitrary
,
and \gamma. We proceed just as before, by regrouping on the left side:
and equating the coefficient of each power of
separately:
If we turn this into matrix form, the matrix of coefficients is exactly the same as before. So we know there’s a single solution, and by rearranging the matrix into I, the solution will appear on the right hand side. It doesn’t matter for the moment what the actual solution is, as long as it exists and is unique. We’ve shown that Q spans the space!
Since the set Q is linearly independent and spans P_n(\mathbb{R}), it is a basis for the space.
I’ve discussed inner products for functions in the post about Hilbert space. Well, polynomials are functions, so we can define an inner product using integrals as follows [3]:
Where the bounds a and b are arbitrary, and could be infinite. Whenever we deal with integrals we worry about convergence; in my post on Hilbert spaces, we only talked about L^2 - the square integrable functions. Most polynomials are not square integrable, however. Therefore, we can restrict this using either:
A special weight function w(x) to make sure the inner product integral converges
Set finite bounds on the integral, and then we can just set w(x)=1.
Let’s use the latter, and restrict the bounds into the range [-1,1], setting w(x)=1. We have the following inner product:
Let’s check that this satisfies the inner product space conditions.
Conjugate symmetry:
Since real multiplication is commutative, we can write:
We deal in the reals here, so we can safely ignore complex conjugation.
Linearity in the first argument:
Let p_1,p_2,q\in P_n(\mathbb{R}) and a,b\in \mathbb{R}. We want to show that
Expand the left-hand side using our definition of inner product:
The result is equivalent to a\langle p_1,q\rangle +b\langle p_2,q\rangle.
Positive-definiteness:
We want to show that for nonzero p\in P_n(\mathbb{R}), we have \langle p, p\rangle > 0. First of all, since p(x)^2\geq0 for all
, it’s true that:
What about the result 0 though? Well, let’s say that
Since p(x)^2 is a non-negative function, this means that the integral of a non-negative function ends up being 0. But p(x) is a polynomial, so it’s continuous, and so is p(x)^2. If the integral of a continuous non-negative function is 0, it means the function itself is 0. Had it been non-zero in any place, the integral would necessarily have to be positive as well.
We’ve proven that \langle p, p\rangle=0 only when p is the zero polynomial. The positive-definiteness condition is satisfied.
In conclusion, P_n(\mathbb{R}) along with the inner product we’ve defined forms an inner product space.
Now that we have an inner product, we can define orthogonality on polynomials: two polynomials p,q are orthogonal (w.r.t. our inner product) iff
Contrary to expectation [4], the monomial basis polynomials are not orthogonal using our definition of inner product.
For example, calculating the inner product for 1 and x^2:
There are other sets of polynomials that are orthogonal using our inner product. For example, the Legendre polynomials; but this is a topic for another post.
There’s a level of basic algebra below which we won’t descend in these notes. We could break this statement further down by saying that something like a_i x^i + a_j x^j can be added to b_i x^i + b_j x^j by adding each power of
separately for any
and j, but let’s just take it for granted.
Obviously, this specific set of equations is quite trivial to solve without matrices; I just want to demonstrate the more general approach. Once we have a system of linear equations, the whole toolbox of linear algebra is at our disposal. For example, we could also have checked the determinant and seen it’s non-zero, which means that a square matrix is invertible, and in this case has a single solution of zeroes.
And actually with this (or any valid) inner product, P_n(\mathbb{R}) indeed forms a Hilbert space, because it’s finite-dimensional, and every finite-dimensional inner product space is complete.
Because of how naturally this set spans P_n(\mathbb{R}). And indeed, we can define alternative inner products using which monomials are orthogonal.
For comments, please send me an email.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み