# 向量空間中的向量表示法
Vector representation in a vector space

This work by Jephian Lin is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).
$\newcommand{\trans}{^\top}
\newcommand{\adj}{^{\rm adj}}
\newcommand{\cof}{^{\rm cof}}
\newcommand{\inp}[2]{\left\langle#1,#2\right\rangle}
\newcommand{\dunion}{\mathbin{\dot\cup}}
\newcommand{\bzero}{\mathbf{0}}
\newcommand{\bone}{\mathbf{1}}
\newcommand{\ba}{\mathbf{a}}
\newcommand{\bb}{\mathbf{b}}
\newcommand{\bc}{\mathbf{c}}
\newcommand{\bd}{\mathbf{d}}
\newcommand{\be}{\mathbf{e}}
\newcommand{\bh}{\mathbf{h}}
\newcommand{\bp}{\mathbf{p}}
\newcommand{\bq}{\mathbf{q}}
\newcommand{\br}{\mathbf{r}}
\newcommand{\bx}{\mathbf{x}}
\newcommand{\by}{\mathbf{y}}
\newcommand{\bz}{\mathbf{z}}
\newcommand{\bu}{\mathbf{u}}
\newcommand{\bv}{\mathbf{v}}
\newcommand{\bw}{\mathbf{w}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\nul}{\operatorname{null}}
\newcommand{\rank}{\operatorname{rank}}
%\newcommand{\ker}{\operatorname{ker}}
\newcommand{\range}{\operatorname{range}}
\newcommand{\Col}{\operatorname{Col}}
\newcommand{\Row}{\operatorname{Row}}
\newcommand{\spec}{\operatorname{spec}}
\newcommand{\vspan}{\operatorname{span}}
\newcommand{\Vol}{\operatorname{Vol}}
\newcommand{\sgn}{\operatorname{sgn}}
\newcommand{\idmap}{\operatorname{id}}
\newcommand{\am}{\operatorname{am}}
\newcommand{\gm}{\operatorname{gm}}
\newcommand{\mult}{\operatorname{mult}}
\newcommand{\iner}{\operatorname{iner}}$
```python
from lingeo import random_int_list
from linspace import ptov, vtop
```
## Main idea
Let $V$ be a vector space.
Let $\beta = \{ \bu_1, \ldots, \bu_n \}$ be a basis of $V$.
Every vector $\bv\in V$ has a unique way to be written as a linear combination
$$
\bv = c_1\bu_1 + \cdots + c_n\bu_n.
$$
We call the vector $(c_1,\ldots, c_n)\in\mathbb{R}^n$ the **vector representation** of $\bv$ with respect to the basis $\beta$, denoted as $[\bv]_\beta$.
Let $\mathcal{P}_d$ be the vector space of all polynomials of degree at most $d$.
Let $\beta = \{1, x, \ldots, x^d\}$ be the standard basis of $\mathcal{P}_d$.
Then $[p]_\beta = \operatorname{ptov}(p)$ is simply writing down the coefficients of $p$ into a vector in $\mathbb{R}^{d+1}$.
Let $\mathcal{M}_{m.n}$ be the vector space of all $m\times n$ matrices.
Let $\beta = \{E_{11}, \ldots, E_{1n}, \ldots, E_{m1}, \ldots, E_{mn}\}$ be the standard basis of $\mathcal{M}_{m,n}$.
Then $[A]_\beta = \operatorname{mtov}(A)$ is simply writing down the entries of $A$ into a vector in $\mathbb{R}^{mn}$ in the row-major order.
## Side stories
- use the standard basis to solve the vector representation
- new inner product
## Experiments
##### Exercise 1
執行以下程式碼。
令 $\mathcal{P}_2$ 為所有次數小於等於 $2$ 的多項式所形成的向量空間。
令 $\alpha = \{1, x, x^2\}$ 為 $\mathcal{P}_2$ 的標準基底。
令 $\beta = \{1, (1+x), (1+x)^2\}$ 為 $\mathcal{P}_2$ 的另一組基底。
<!-- eng start -->
Run the code below. Let $\mathcal{P}_2$ be the vector space of all polynomials of degree at most $2$. Let $\alpha = \{1, x, x^2\}$ be the standard basis of $\mathcal{P}_2$. Let $\beta = \{1, (1+x), (1+x)^2\}$ be another basis of $\mathcal{P}_2$.
<!-- eng end -->
```python
### code
set_random_seed(0)
print_ans = False
d = 2
p1,p2,p3 = 1, 1+x, (1+x)^2
p = vtop(vector(random_int_list(d+1)))
print("p =", p)
if print_ans:
A = matrix([ptov(p1, d), ptov(p2, d), ptov(p3, d)]).transpose()
p_alpha = ptov(p, d)
p_beta = A.inverse() * p_alpha
print("[p]_alpha =", ptov(p, d))
print("[p]_beta =", p_beta)
print("A =")
show(A)
```
By running the code above with `seed = 0`, we obtain that
$$
p=5x^2+3x-4.
$$
##### Exercise 1(a)
求出 $[p]_\alpha$。
<!-- eng start -->
Find $[p]_\alpha$.
<!-- eng end -->
:::info
Since the equation
$$
p=-4+3x+5x^2=c_11+c_2x+c_3x^2.
$$
is too trivial, sometimes we would say "By equating the terms on both sids" instead of "By solving the equation".
There is nothing wrong with your answer, though.
:::
**Solution:**
By the definition, we know that
$$
[p]_\alpha=\begin{bmatrix}\
c_1 \\
c_2 \\
c_3
\end{bmatrix}, c_1, c_2, c_3 \in\mathbb{R}
$$
such that
$$
p=-4+3x+5x^2=c_11+c_2x+c_3x^2.
$$
By equating the terms on both sides, we get $c_1=-4,c_2=3,c_3=5$.
Thus,
$$
[p]_\alpha=\begin{bmatrix}\
-4 \\
3 \\
5
\end{bmatrix}.
$$
##### Exercise 1(b)
求出 $[p]_\beta$。
<!-- eng start -->
Find $[p]_\beta$.
<!-- eng end -->
**Solution:**
By the definition, we know that
$$
[p]_\beta=\begin{bmatrix}\
c_1 \\
c_2 \\
c_3
\end{bmatrix}, c_1, c_2, c_3 \in\mathbb{R}
$$
such that
$$
p=-4+3x+5x^2=c_11+c_2(1+x)+c_3(1+x)^2.
$$
By solving the equation, we get $c_1=-2,c_2=-7,c_3=5$.
Thus,
$$
[p]_\alpha=\begin{bmatrix}\
-2 \\
-7 \\
5
\end{bmatrix}.
$$
##### Exercise 1(c)
令 $p_1, \ldots, p_3$ 為 $\beta$ 中的各多項式。
寫出 $3\times 3$ 矩陣 $A$
其各行向量為 $[p_1]_\alpha, \ldots, [p_3]_\alpha$。
<!-- eng start -->
Let $p_1, \ldots, p_3$ be the polynomials in $\beta$. Find the $3\times 3$ matrix $A$ whose columns are $[p_1]_\alpha, \ldots, [p_3]_\alpha$.
<!-- eng end -->
:::warning
- [x] No need to use `\space` --- we can talk about this during the meeting.
:::
$Ans:$
Suppose
$p_1 = 1$, $p_2 = 1 + x$, $p_3 = (1+x)^2$
for
$p_1, \space p_2, \space p_3 \space$
are the polynomials in $\beta$.
$$
[p_1]_\alpha =
\begin{bmatrix}
1 \\0 \\0
\end{bmatrix}
, \space
[p_2]_\alpha =
\begin{bmatrix}
1 \\1 \\0
\end{bmatrix}
, \space
[p_3]_\alpha =
\begin{bmatrix}
1 \\2 \\1
\end{bmatrix}
;\space \text{thus}thus,
$$
$$
A =
\begin{bmatrix}
1 & 1 & 1\\
0 & 1 & 2\\
0 & 0 & 1
\end{bmatrix}.
$$
##### Exercise 1(d)
驗證並說明為什麼 $A[p]_\beta = [p]_\alpha$。
<!-- eng start -->
Verify and explain why $A[p]_\beta = [p]_\alpha$.
<!-- eng end -->
:::success
Nice :+1:
:::
$Ans:$\
For any $p \in \mathcal{P}_2,\space$ suppose
$[p]_\beta =
\begin{bmatrix}
c_1 \\ c_2 \\ c_3
\end{bmatrix}
,\space$
$p = c_1p_1 + c_2p_2 + c_3p_3.$\
Then,
$$
\begin{aligned}
A[p]_\beta &= A
\begin{bmatrix}
c_1 \\ c_2 \\ c_3
\end{bmatrix}\\
& = A
\begin{bmatrix}
c_1 \\ 0 \\ 0
\end{bmatrix}
+ A
\begin{bmatrix}
0 \\ c_2 \\ 0
\end{bmatrix}
+ A
\begin{bmatrix}
0 \\ 0 \\ c_3
\end{bmatrix}\\
&=
c_1[p_1]_\alpha
+ c_2[p_2]_\alpha
+ c_3[p_3]_\alpha\\
& =
[p]_\alpha.
\end{aligned}
$$
## Exercises
##### Exercise 2
令 $\mathcal{P}_2$ 為所有次數小於等於 $2$ 的多項式所形成的向量空間。
令 $p = 2 + 3x + 4x^2$。
<!-- eng start -->
Let $\mathcal{P}_2$ be the vector space of all polynomials of degree at most $2$. Let $p = 2 + 3x + 4x^2$.
<!-- eng end -->
##### Exercise 2(a)
令 $\beta = \{1,x,x^2\}$ 為 $\mathcal{P}_2$ 的一組基底。
求 $[p]_\beta$。
<!-- eng start -->
Let $\beta = \{1,x,x^2\}$ be a basis of $\mathcal{P}_2$. Find $[p]_\beta$.
<!-- eng end -->
**Solution:**
By the definition, we know that
$$
[p]_\beta=
\begin{bmatrix}
c_1 \\ c_2 \\ c_3
\end{bmatrix}
, c_1, c_2, c_3 \in\mathbb{R}
$$
such that
$$
p=2+3x+4x^2=c_11+c_2x+c_3x^2.
$$
By solving equation, we get $c_1=2,c_2=3,c_3=4$.
Thus,
$$
[p]_\beta=
\begin{bmatrix}
2 \\ 3 \\ 4
\end{bmatrix}.
$$
##### Exercise 2(b)
令 $\beta = \{1,(1-x),(1-x)^2\}$ 為 $\mathcal{P}_2$ 的一組基底。
求 $[p]_\beta$。
<!-- eng start -->
Let $\beta = \{1,(1-x),(1-x)^2\}$ be a basis of $\mathcal{P}_2$. Find $[p]_\beta$.
<!-- eng end -->
:::success
Well done! :100:
:::
$Ans:$\
By exercise 1(c\) & 1(d)
, we know that it is possible to use the member of $\beta$
to compose a matrix
$A =
\begin{bmatrix}
1 & 1 & 1\\
0 & -1 & -2\\
0 & 0 & 1
\end{bmatrix},$
and for any
$p \in \mathcal{P}_2,
\space$
$A[p]_\beta = [p]_\alpha.$
※ $[p]_\alpha$ holds the same value of $[p]_\beta$ in 2(a).
Since
$A^{-1} =
\begin{bmatrix}
1 & 1 & 1\\
0 & -1 & -2\\
0 & 0 & 1
\end{bmatrix}
,\space$
$$
[p]_\beta = A^{-1}[p]_\alpha = \begin{bmatrix}
9\\-11\\4
\end{bmatrix}.
$$
##### Exercise 2(c)
令 $\beta = \{1,x,x(x-1)\}$ 為 $\mathcal{P}_2$ 的一組基底。
求 $[p]_\beta$。
<!-- eng start -->
Let $\beta = \{1,x,x(x-1)\}$ be a basis of $\mathcal{P}_2$. Find $[p]_\beta$.
<!-- eng end -->
:::warning
- [x] Using $c_1,c_2,c_3$ instead of $C_1,C_2,C_3$ is recommended.
:::
$Ans:$
Let
$$
[p]_\beta =
\begin{bmatrix}
c_1 \\ c_2 \\ c_3
\end{bmatrix}.
$$
Then, by solving the equation below,
$$
c_1 \cdot 1
+ c_2 \cdot x
+ c_3 \cdot x(x-1)
= 2 + 3x + 4x^2,
$$
we get
$$
c_1 = 2,c_2 = 7,c_3 = 4.
$$
Thus,
$$
[p]_\beta =
\begin{bmatrix}
2 \\ 7 \\ 4
\end{bmatrix}.
$$
##### Exercise 2(d)
令
$$
\begin{aligned}
p_1(x) &= \frac{(x-2)(x-3)}{(1-2)(1-3)}, \\
p_2(x) &= \frac{(x-1)(x-3)}{(2-1)(2-3)}, \\
p_3(x) &= \frac{(x-1)(x-2)}{(3-1)(3-2)}. \\
\end{aligned}
$$
令 $\beta = \{p_1, p_2, p_3\}$ 為 $\mathcal{P}_2$ 的一組基底。
求 $[p]_\beta$。
<!-- eng start -->
Let
$$
\begin{aligned}
p_1(x) &= \frac{(x-2)(x-3)}{(1-2)(1-3)}, \\
p_2(x) &= \frac{(x-1)(x-3)}{(2-1)(2-3)}, \\
p_3(x) &= \frac{(x-1)(x-2)}{(3-1)(3-2)}. \\
\end{aligned}
$$
Let $\beta = \{p_1, p_2, p_3\}$ be a basis of $\mathcal{P}_2$. Find $[p]_\beta$.
<!-- eng end -->
:::info
There is an easier way to find $c_1$, $c_2$, $c_3$ in this particular case.
:::
**Solution:**
After reducation, we get that
$$
p_1(x)=\frac{6-5x+x^2}{2}, \\
p_2(x)=-3+4x-x^2, \\
p_3(x)=\frac{2-3x+x^2}{2}.
$$
By the definition, we know that
$$
[p]_\beta=
\begin{bmatrix}\
c_1 \\
c_2 \\
c_3
\end{bmatrix},a,b,c\in\mathbb{R}
$$
such that
$$
p=2+3x+4x^2=c_1p_1(x)+c_2p_2(x)+c_3p_3(x).
$$
By solving the equation,
$$
\begin{cases}
3c_1-3c_2+c_3=2 \\
-\frac{5c_1}{2}+4c_2-\frac{3c_3}{2}=3 \\
\frac{c_1}{2}-c_2+\frac{c_3}{2}=4
\end{cases}.
$$
Then, we get $c_1=9,c_2-24,c_3=47$.
Thus,
$$
[p]_\beta=
\begin{bmatrix}\
9 \\
24 \\
47
\end{bmatrix}.
$$
##### Exercise 3
令 $\mathcal{M}_{2,3}$ 為所有 $2\times 3$ 矩陣所形成的向量空間。
令
$$
A = \begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{bmatrix}.
$$
<!-- eng start -->
Let $\mathcal{M}_{2,3}$ be the vector space of all $2\times 3$ matrices.
Let
$$
A = \begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{bmatrix}.
$$
<!-- eng end -->
##### Exercise 3(a)
令 $\beta = \{E_{11}, E_{12}, E_{13}, E_{21}, E_{22}, E_{23}\}$ 為 $\mathcal{M}_{2,3}$ 的標準基底。
求 $[A]_\beta$。
<!-- eng start -->
Let $\beta = \{E_{11}, E_{12}, E_{13}, E_{21}, E_{22}, E_{23}\}$ be the standard basis of $\mathcal{M}_{2,3}$. Find $[A]_\beta$.
<!-- eng end -->
##### Exercise 3(a) - solution by Kevin:
Let
$$
[A]_\beta = \begin{bmatrix}
a\\
b\\
c\\
d\\
e\\
f\\
\end{bmatrix}.
$$
By solving the equation:
$$
aE_{11}+bE_{12}+cE_{13}+dE_{21}+eE_{22}+fE_{23}\ = A
$$
which is,
$$
a\begin{bmatrix}
1 & 0 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}+
b\begin{bmatrix}
0 & 1 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}+
c\begin{bmatrix}
0 & 0 & 1 \\
0 & 0 & 0 \\
\end{bmatrix}+
d\begin{bmatrix}
0 & 0 & 0 \\
1 & 0 & 0 \\
\end{bmatrix}+
e\begin{bmatrix}
0 & 0 & 0 \\
0 & 1 & 0 \\
\end{bmatrix}+
f\begin{bmatrix}
0 & 0 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}=
\begin{bmatrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
\end{bmatrix}.
$$
We get:
$$
a=1, b=2, c=3, d=4, e=5, f=6
$$
Thus,
$$
[A]_\beta = \begin{bmatrix}
1\\
2\\
3\\
4\\
5\\
6\\
\end{bmatrix}.
$$
##### Exercise 3(b)
令
$$
M_1 = \begin{bmatrix}
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
M_2 = \begin{bmatrix}
0 & 1 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
M_3 = \begin{bmatrix}
0 & 0 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
$$
$$
M_4 = \begin{bmatrix}
0 & 0 & 0 \\
1 & 1 & 1 \\
\end{bmatrix},
M_5 = \begin{bmatrix}
0 & 0 & 0 \\
0 & 1 & 1 \\
\end{bmatrix},
M_6 = \begin{bmatrix}
0 & 0 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}.
$$
令 $\beta = \{M_1, M_2, M_3, M_4, M_5, M_6\}$ 為 $\mathcal{M}_{2,3}$ 的一組基底。
求 $[A]_\beta$。
<!-- eng start -->
Let
$$
M_1 = \begin{bmatrix}
1 & 1 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
M_2 = \begin{bmatrix}
0 & 1 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
M_3 = \begin{bmatrix}
0 & 0 & 1 \\
1 & 1 & 1 \\
\end{bmatrix},
$$
$$
M_4 = \begin{bmatrix}
0 & 0 & 0 \\
1 & 1 & 1 \\
\end{bmatrix},
M_5 = \begin{bmatrix}
0 & 0 & 0 \\
0 & 1 & 1 \\
\end{bmatrix},
M_6 = \begin{bmatrix}
0 & 0 & 0 \\
0 & 0 & 1 \\
\end{bmatrix}.
$$
Let $\beta = \{M_1, M_2, M_3, M_4, M_5, M_6\}$ be a basis of $\mathcal{M}_{2,3}$. Find $[A]_\beta$.
<!-- eng end -->
:::warning
- [x] After reducation --> By rearranging the equation above
:::
**Solution:**
By the definition, we know that
$$
[A]_\beta=
\begin{bmatrix}\
a \\
b \\
c \\
d \\
e \\
f
\end{bmatrix},a,b,c,d,e,f\in\mathbb{R}
$$
such that $aM_1+bM_2+cM_3+dM_4+eM_5+fM_6=A$.
By rearranging the equation above, we get
$$
\begin{bmatrix}\
a & a+b & a+b+c \\
a+b+c+d & a+b+c+d+e & a+b+c+d+e+f
\end{bmatrix}=
\begin{bmatrix}\
1 & 2 & 3 \\
4 & 5 & 6
\end{bmatrix}.
$$
Thus,
$$
[A]_\beta=
\begin{bmatrix}\
1 \\
1 \\
1 \\
1 \\
1 \\
1
\end{bmatrix}.
$$
##### Exercise 4
以下例子說明一些向量空間的內積
其實就是某個表示法下的 $\mathbb{R}^n$ 標準內積。
(實際上所有有限維度空間中的內積
都可以寫成某個表示法下的 $\mathbb{R}^n$ 標準內積。
但證明須要用到一些對角化的工具。)
<!-- eng start -->
In the following examples, we will see that some inner product of abstract vectors can be written as the standard inner product of their vector representations in $\mathbb{R}^n$. Indeed, any inner product on a finite-dimentional vector space can be written as the standard inner product of vector representations in $\mathbb{R}^n$.
<!-- eng end -->
##### Exercise 4(a)
令 $\mathcal{M}_{m,n}$ 為所有 $m\times n$ 矩陣所形成的向量空間。
我們曾經驗證過 $\inp{A}{B} = \tr(B\trans A)$ 是一種合法的內積。
說明其實 $\tr(B\trans A) = \inp{[A]_\beta}{[B]_\beta}$,
其中 $\beta$ 是 $\mathcal{M}_{m,n}$ 的標準基底。
<!-- eng start -->
Let $\mathcal{M}_{m,n}$ be the vector space of all $m\times n$ matrices. In 213-5, We have verified that $\inp{A}{B} = \tr(B\trans A)$ is indeed an inner product.
Verify and give some intuition to $\tr(B\trans A) = \inp{[A]_\beta}{[B]_\beta}$, where $\beta$ is the standard basis of $\mathcal{M}_{m,n}$.
<!-- eng end -->
##### Exercise 4(b)
令 $\mathcal{P}_3$ 為所有次數小於等於 $3$ 的多項式所形成的向量空間。
我們曾經驗證過 $\inp{p_1}{p_2} = a_0b_0 + a_1b_1 + a_2b_2 + a_3b_3$ 是一種合法的內積,其中
$$
\begin{aligned}
p_1 &= a_0 + a_1x + a_2x^2 + a_3x^3, \\
p_2 &= b_0 + b_1x + b_2x^2 + b_3x^3. \\
\end{aligned}
$$
說明其實 $\inp{p_1}{p_2} = \inp{[p_1]_\beta}{[p_2]_\beta}$,
其中 $\beta$ 是 $\mathcal{P}_3$ 的標準基底。
<!-- eng start -->
Let $\mathcal{P}_3$ be the vector space of all polynomials of degree at most $3$. In 213-5, We have verified that $\inp{p_1}{p_2} = a_0b_0 + a_1b_1 + a_2b_2 + a_3b_3$ is indeed an inner product, where
$$
\begin{aligned}
p_1 &= a_0 + a_1x + a_2x^2 + a_3x^3, \\
p_2 &= b_0 + b_1x + b_2x^2 + b_3x^3. \\
\end{aligned}
$$
Verify and give some intuition to $\inp{p_1}{p_2} = \inp{[p_1]_\beta}{[p_2]_\beta}$, where $\beta$ is the standard basis of $\mathcal{P}_3$.
<!-- eng end -->
##### Exercise 4(c)
令 $\mathcal{P}_3$ 為所有次數小於等於 $3$ 的多項式所形成的向量空間。
我們曾經驗證過 $\inp{p_1}{p_2} = p_1(1)p_2(1) + p_1(2)p_2(2) + p_1(3)p_2(3) + p_1(4)p_2(4)$ 是一種合法的內積。
令
$$
\begin{aligned}
f_1(x) &= \frac{(x-2)(x-3)(x-4)}{(1-2)(1-3)(1-4)}, \\
f_2(x) &= \frac{(x-1)(x-3)(x-4)}{(2-1)(2-3)(2-4)}, \\
f_3(x) &= \frac{(x-1)(x-2)(x-4)}{(3-1)(3-2)(3-4)}, \\
f_4(x) &= \frac{(x-1)(x-2)(x-3)}{(4-1)(4-2)(4-3)}. \\
\end{aligned}
$$
說明其實 $\inp{p_1}{p_2} = \inp{[p_1]_\beta}{[p_2]_\beta}$,
其中 $\beta = \{f_1, f_2, f_3, f_4\}$ 是 $\mathcal{P}_3$ 的一組基底。
<!-- eng start -->
Let $\mathcal{P}_3$ be the vector space of all polynomials of degree at most $3$. In 213-5, We have verified that $\inp{p_1}{p_2} = p_1(1)p_2(1) + p_1(2)p_2(2) + p_1(3)p_2(3) + p_1(4)p_2(4)$ is indeed an inner product.
Let
$$
\begin{aligned}
f_1(x) &= \frac{(x-2)(x-3)(x-4)}{(1-2)(1-3)(1-4)}, \\
f_2(x) &= \frac{(x-1)(x-3)(x-4)}{(2-1)(2-3)(2-4)}, \\
f_3(x) &= \frac{(x-1)(x-2)(x-4)}{(3-1)(3-2)(3-4)}, \\
f_4(x) &= \frac{(x-1)(x-2)(x-3)}{(4-1)(4-2)(4-3)}. \\
\end{aligned}
$$
Verify and give some intuition to $\inp{p_1}{p_2} = \inp{[p_1]_\beta}{[p_2]_\beta}$, where $\beta = \{f_1, f_2, f_3, f_4\}$ 是 $\mathcal{P}_3$ is the standard basis of $\mathcal{P}_3$.
<!-- eng end -->
:::info
collaboration: 1
4 problems: 4
- done: 2a, 2b, 2c, 2d
extra: 1
- done: 4a, 4b
Nice answers: 1
moderator: 1
quality control: 1
:::