223 lines
5.1 KiB
Markdown
223 lines
5.1 KiB
Markdown
|
# 基础通关 | 线性代数5道典型例题及解析
|
|||
|
|
|||
|
你好,我是朱维刚。欢迎你继续跟我学习线性代数。
|
|||
|
|
|||
|
今天这一节课的内容是基础通关。这里会用5道典型例题,让你巩固一下线性代数的基础知识,这也是进入应用篇学习之前的一次动手机会。从课程上线到现在快有一个月了,这期间我收到了不少同学的提问和建议,有些问题也是我没有想到的,非常有深度,说实话这让我感觉挺意外的,希望你再接再厉。
|
|||
|
|
|||
|
现在,你可以看一下基础通关的5道例题了,题目和解析都放在了正文中,你可以自己试着做一下。基础通关后,我们应用篇再见。
|
|||
|
|
|||
|
## 例题一
|
|||
|
|
|||
|
找到线性方程组$Ax=b$的所有解,其中:
|
|||
|
|
|||
|
$$
|
|||
|
A=\\left\[\\begin{array}{cc}
|
|||
|
1 & 2 \\\\\\
|
|||
|
3 & 0 \\\\\\
|
|||
|
\-1 & 2
|
|||
|
\\end{array}\\right\], b=\\left\[\\begin{array}{c}
|
|||
|
1 \\\\\\
|
|||
|
0 \\\\\\
|
|||
|
1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
### 解析:
|
|||
|
|
|||
|
这里考察了解线性方程组的方法,特别是高斯消元法,你可以参考第4节的内容。
|
|||
|
|
|||
|
首先,形成增广矩阵:
|
|||
|
|
|||
|
$$
|
|||
|
\\left\[\\begin{array}{cccc}
|
|||
|
1 & 2 & 1 \\\\\\
|
|||
|
3 & 0 & 0 \\\\\\
|
|||
|
\-1 & 2 & 1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
接着,分步计算增广矩阵的行阶梯形矩阵:
|
|||
|
|
|||
|
1. 第一行乘-3和第二行相加。
|
|||
|
2. 第一行和第三行相加。
|
|||
|
|
|||
|
$$
|
|||
|
\\left\[\\begin{array}{cccc}
|
|||
|
1 & 2 & 1 \\\\\\
|
|||
|
0 & -6 & -3 \\\\\\
|
|||
|
0 & 4 & 2
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
2. 第二行乘$\\frac{1}{3}$和第一行相加。
|
|||
|
3. 第二行乘$\\frac{2}{3}$和第三行相加。
|
|||
|
4. 第三行乘$-\\frac{1}{6}$。
|
|||
|
|
|||
|
$$
|
|||
|
\\left\[\\begin{array}{llll}
|
|||
|
1 & 0 & 0 \\\\\\
|
|||
|
0 & 1 & \\frac{1}{2} \\\\\\
|
|||
|
0 & 0 & 0
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
最后得出该线性方程组的唯一解:
|
|||
|
|
|||
|
$$
|
|||
|
x=\\left\[\\begin{array}{l}
|
|||
|
0 \\\\\\
|
|||
|
\\frac{1}{2}
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
## 例题二
|
|||
|
|
|||
|
找到线性方程组$Ax=b$的所有解,其中:
|
|||
|
|
|||
|
$$
|
|||
|
A=\\left\[\\begin{array}{lll}
|
|||
|
1 & 2 & 3 \\\\\\
|
|||
|
0 & 2 & 2
|
|||
|
\\end{array}\\right\], b=\\left\[\\begin{array}{l}
|
|||
|
1 \\\\\\
|
|||
|
1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
### 解析:
|
|||
|
|
|||
|
这里考察了解线性方程组的方法,特别是高斯消元法。你可以参考第4节的内容,和例题一不同的是,例题二这里得到的会是无穷解。所以,这一题里找特殊解和通用解的方法是关键。
|
|||
|
|
|||
|
首先,形成增广矩阵:
|
|||
|
|
|||
|
$$
|
|||
|
\\left\[\\begin{array}{lllll}
|
|||
|
1 & 2 & 3 & 1 & 1 \\\\\\
|
|||
|
0 & 2 & 2 & 1 & 1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
接着,形成增广矩阵:分步计算增广矩阵的行阶梯形矩阵:
|
|||
|
|
|||
|
1. 第一行乘-1和第二行相加;
|
|||
|
2. 第二行乘1/2。
|
|||
|
|
|||
|
$$
|
|||
|
\\left\[\\begin{array}{lllll}
|
|||
|
1 & 0 & 1 & 1 & 0 \\\\\\
|
|||
|
0 & 1 & 1 & 1 & \\frac{1}{2}
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
使用主元列,得到特殊解:
|
|||
|
|
|||
|
$$
|
|||
|
x=\\left\[\\begin{array}{l}
|
|||
|
0 \\\\\\
|
|||
|
\\frac{1}{2} \\\\\\
|
|||
|
0
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
下一步,获取线性方程组$Ax=0$的通用解,从增广矩阵的左边,能够立即得出:
|
|||
|
|
|||
|
$$
|
|||
|
\\lambda\\left\[\\begin{array}{c}
|
|||
|
1 \\\\\\
|
|||
|
1 \\\\\\
|
|||
|
\-1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
最后,把特殊解和通用解组合起来就是:
|
|||
|
|
|||
|
$$
|
|||
|
x=\\left\[\\begin{array}{l}
|
|||
|
0 \\\\\\
|
|||
|
\\frac{1}{2} \\\\\\
|
|||
|
0
|
|||
|
\\end{array}\\right\]+\\lambda\\left\[\\begin{array}{c}
|
|||
|
1 \\\\\\
|
|||
|
1 \\\\\\
|
|||
|
\-1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
## 例题三
|
|||
|
|
|||
|
计算矩阵乘$AB$。
|
|||
|
|
|||
|
$$
|
|||
|
A=\\left\[\\begin{array}{ccc}
|
|||
|
1 & 2 & 3 \\\\\\
|
|||
|
0 & -1 & 2
|
|||
|
\\end{array}\\right\], B=\\left\[\\begin{array}{ccc}
|
|||
|
4 & -1 & 2 \\\\\\
|
|||
|
0 & 2 & 1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
### 解析:
|
|||
|
|
|||
|
这里考察了基本的矩阵乘运算,特别是普通矩阵乘,只有相邻阶数匹配的矩阵才能相乘,你可以参考第3节的内容。
|
|||
|
|
|||
|
矩阵乘无法完成,因为$A$是2行3列矩阵,$B$也是2行3列矩阵,$A$和邻居维度不同。
|
|||
|
|
|||
|
## 例题四
|
|||
|
|
|||
|
计算矩阵乘$AB$。
|
|||
|
|
|||
|
$$
|
|||
|
A=\\left\[\\begin{array}{ccc}
|
|||
|
1 & 2 & 3 \\\\\\
|
|||
|
0 & -1 & 2
|
|||
|
\\end{array}\\right\], B=\\left\[\\begin{array}{cc}
|
|||
|
4 & -1 \\\\\\
|
|||
|
2 & 0 \\\\\\
|
|||
|
2 & 1
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
### 解析:
|
|||
|
|
|||
|
这里考察了基本的矩阵乘运算,特别是普通矩阵乘,你可以参考第3节的内容。
|
|||
|
|
|||
|
矩阵乘可以完成,因为两个矩阵的邻居维度相同,拿$a\_{11}$举例:$a\_{11}=1 \\times 4+2 \\times 2+3 \\times 2=14$,结果:
|
|||
|
|
|||
|
$$
|
|||
|
A B=\\left\[\\begin{array}{cc}
|
|||
|
14 & 2 \\\\\\
|
|||
|
2 & 2
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
## 例题五
|
|||
|
|
|||
|
假设$R^{3}$和它的运算$\\langle\\ ·,· \\rangle$,$x, y \\in R^{3}$,我们有:
|
|||
|
|
|||
|
$$
|
|||
|
\\langle x, y\\rangle=x^{T} A y, A=\\left\[\\begin{array}{ccc}
|
|||
|
4 & 2 & 1 \\\\\\
|
|||
|
0 & 4 & -1 \\\\\\
|
|||
|
1 & -1 & 5
|
|||
|
\\end{array}\\right\]
|
|||
|
$$
|
|||
|
|
|||
|
那么,$\\langle\\ ·,· \\rangle$是内积吗?
|
|||
|
|
|||
|
### 解析:
|
|||
|
|
|||
|
这里考察了内积,以及内积的性质之一:对称性,你可以参考第10节的内容。
|
|||
|
|
|||
|
选择$x=\\left\[\\begin{array}{lll}1 & 1 & 0\\end{array}\\right\]^{T}$,$y=\\left\[\\begin{array}{lll}1 & 2 & 0\\end{array}\\right\]^{T}$,通过计算,能够得到:
|
|||
|
|
|||
|
$$
|
|||
|
\\begin{array}{l}
|
|||
|
\\langle x, y\\rangle=16 \\\\\\
|
|||
|
\\langle y, x\\rangle=14 \\\\\\
|
|||
|
\\langle x, y\\rangle \\neq\\langle y, x\\rangle
|
|||
|
\\end{array}
|
|||
|
$$
|
|||
|
|
|||
|
于是,$\\langle\\ ·,· \\rangle$是不对称的。
|
|||
|
|