线性方程解法(齐次,非齐次)

转载地址:https://en.wikipedia.org/wiki/System_of_linear_equations#Solving_a_linear_system

由于很多地方需要求解   齐次,非齐次线性方程,把线代,高数书毕业了都扔了,汗,简单总结一下。

 

实际中都是用Eigen 库,调用API解线性方程组,得注意每个函数的适用条件。

 

 

A{\mathbf {x}}={\mathbf {b}}

where A is an m×n matrix, x is a column vector with n entries, and b is a column vector with m entries.

A={\begin{bmatrix}a_{11}&a_{12}&\cdots &a_{1n}\\a_{21}&a_{22}&\cdots &a_{2n}\\\vdots &\vdots &\ddots &\vdots \\a_{m1}&a_{m2}&\cdots &a_{mn}\end{bmatrix}},\quad {\mathbf {x}}={\begin{bmatrix}x_{1}\\x_{2}\\\vdots \\x_{n}\end{bmatrix}},\quad {\mathbf {b}}={\begin{bmatrix}b_{1}\\b_{2}\\\vdots \\b_{m}\end{bmatrix}}

 

其中:A的行向量之间线性无关,这样每一行带来的才是关于参数新的约束信息。

In general, the behavior of a linear system is determined by the relationship between the number of equations and the number of unknowns:

  • Usually, a system with fewer equations than unknowns has infinitely many solutions, but it may have no solution. Such a system is known as an underdetermined system.
  • Usually, a system with the same number of equations and unknowns has a single unique solution.
  • Usually, a system with more equations than unknowns has no solution. Such a system is also known as an overdetermined system.(在实际中,我们往往用线性最小二乘的方法求X,使得|| b-AX || 最小)

A{\textbf {x}}={\textbf {0}} 的解 只有两种:

零解和非零解(无数多个)。

A假设为:  m*n  , r(A)=r

当 r=n,   只有零解;

当 r<n ,  n-r个基础解系,即有非零解;

 


A{\textbf {x}}={\textbf {0}} 的解 : SVD

Solving homogeneous linear equations[edit]

A set of homogeneous linear equations can be written as Ax = 0 for a matrix A and vector x. A typical situation is that A is known and a non-zero x is to be determined which satisfies the equation. Such an x belongs to A's null space and is sometimes called a (right) null vector of A.

: The vector x can be characterized as a right-singular vector corresponding to a singular value of A that is zero.

This observation means that if A is a square matrix and has no vanishing singular value, the equation has no non-zero x as a solution. It also means that if there are several vanishing(零值)singular values, any linear combination of the corresponding right-singular vectors is a valid solution. Analogously to the definition of a (right) null vector, a non-zero x satisfying xA = 0, with x∗ denoting the conjugate transpose of x, is called a left null vector of A.

 

AX=b的解

If the equation system is expressed in the matrix formA{\mathbf {x}}={\mathbf {b}}, the entire solution set can also be expressed in matrix form. If the matrix A is square (has m rows and n=m columns) and has full rank (all m rows are independent), then the system has a unique solution given by

{\mathbf {x}}=A^{-1}{\mathbf {b}}

where A^{-1} is the inverse of A.

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值