快速的方法来检查,如果一个矩阵是奇异? (不可逆,DET = 0) [英] Fast method to check if a Matrix is singular? (non-invertible, det = 0)

查看:716
本文介绍了快速的方法来检查,如果一个矩阵是奇异? (不可逆,DET = 0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是最快的算法(链接到C或C ++的例子是凉)检查一个小方阵(小于16×16元)?是单数(不可逆,DET = 0)

What is the fastest algorithm (a link to C or C++ example would be cool) to check if a small square matrix (<16*16 elements) is singular (non-invertible, det = 0) ?

推荐答案

最好的办法是计算条件数通过SVD并检查是否大于1 /ε,其中,小量的机器precision。

Best way is to compute the condition number via SVD and check if it is greater than 1 / epsilon, where epsilon is the machine precision.

如果您允许假阴性(即一个矩阵是有缺陷的,但是你的算法可能无法检测它),你可以使用MAX(a_ii)/分钟(a_ii)公式从维基百科的文章作为条件数的代理,但你必须先计算QR分解(该公式适用于三角矩阵):A = QR其中R正交,然后COND(A)= COND(Q)。也有技术来计算的Q为O(N)的操作的条件数,但也存在更复杂的

If you allow false negatives (ie. a matrix is defective, but your algorithm may not detect it), you can use the max(a_ii) / min(a_ii) formula from the Wikipedia article as a proxy for the condition number, but you have to compute the QR decomposition first (the formula applies to triangular matrices): A = QR with R orthogonal, then cond(A) = cond(Q). There are also techniques to compute the condition number of Q with O(N) operations, but there are more complex.

这篇关于快速的方法来检查,如果一个矩阵是奇异? (不可逆,DET = 0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆