前面用高斯消元法或矩阵LU分解求解线性方程组的解,主要是针对有唯一解(矩阵A可逆)的情况,下面进一步介绍线性方程组有多个解的情况下,解的求解.…
一 线性方程组 Ax=b 的解释 线性方程组 Ax=b,其中矩阵 A 尺寸为 m*n, 当 A 为方正时,可使用消元法判断解是否存在并求解.当 A 为长方形矩阵时,同样可使用消元法判断解存在情况并求解. 线性方程组 Ax=b 可以使用不同观点看待: 1)可看作函数 f(x)=b,即输入任意 n 维向量 x,经过矩阵 A 变换处理,输出 m 维向量 b,即向量 b 由向量 x 通过矩阵 A 线性变换得到: 2)令 , ,Ax=b 可表示为 , 进一步改写得 , 当 b 是矩阵 A 列向量  的线性…
概述 个人认为线性代数从三个角度,或者说三个工具来阐述了线性关系,分别是: 向量 矩阵 空间 这三个工具有各自的一套方法,而彼此之间又存在这密切的联系,通过这些抽象出来的工具可以用来干一些实际的活,最为直接的就是解方程组,进一步衍生出来最小二乘法等等. 这一部分主要讲了三个工具的各自的一些基本方法,以及用其解方程组的一套理论.另外,由于是总结,就不按照课程的顺序,而且各点之间都有穿插. 向量(Vector) 对于向量而言,大部分与中学一致,基本的就不说了,关注重点. 线性相关性 线性相关性用于描…
关于最简行阶梯矩阵和矩阵秩,可参考<线性代数笔记7——再看行列式与矩阵> 召唤一个方程Ax = b: 3个方程4个变量,方程组有无数解,现在要关注的是b1b2b3之间满足什么条件时方程组有解,它的解是什么? 在这个例子中可以马上看出,b1+b2 = b3,一般的方法是消元法化简: 化简到这一步就可以确定主元是x1和x3.通过最后一行可知,b3 – b2 - b1 = 0.b1b2b3可以是任意数,所以只要满足b3 – b2 - b1 = 0,方程组就有解.这样的组合很多,可以很容易找到一个特解…
x = A\B; x = mldivide(A, B); matlab 在这里的求解与严格的数学意义是不同的, 如果 A 接近奇异,matlab 仍会给出合理的结果,但也会提示警告信息: 如果 A 为方阵,如果解存在的话,x = A\B 的解就是 Ax=B(代入就会成立) 如果 A 不为方阵,返回的是 Ax=B 的最小二乘解: 1. A 和 B 是 full 型矩阵(一般的矩阵) 2. A 为 sparse 型矩阵…
系数需满足条件: a,b不能同时为0 b2-4ac≠0 代码如下def quadratic(a, b, c): """ 返回ax² + bx + c = 0的 """ if not all(map(lambda x: isinstance(x, (int, float)), (a, b, c))): raise TypeError('参数类型只能为int, float') and b == : return None # a, b不能同时为0 e…
At the beginning, the difference between rank and dimension: rank is a property for matrix, while dimension for subspaces. So we can obtain the rank of A, which reveals dimensions of four subspaces(2 from A, 2 from AT). Important fact: The row space…
Special Solutions: Notice what is special about s 1 and S2. They have ones and zeros in the last two components. Those components are "free" and we choose them specially. Then the first components -2 and -3 are determined by the equation Ax = 0.…
Vector Space: R1, R2, R3,R4 , .... Each space Rn consists of a whole collection of vectors. R5 contains all column vectors with five components. This is called "5-dimensional space". The great thing about linear algebra is that it deals easily w…
1. Linear Combination Two linear operations of vectors: Linear combination: 2.Geometric Explainations 2D case 3D case:for 3 vectors u,v,w,the important questions are the common answers are: 3. From Linear Equations to Linear Combinations: a.Row pictu…