用唯一解求解非常大的非线性方程组(数值)
我遇到过一个非常大的非线性方程组,如下所示:
- M'UM = A
- M'VM = B
,其中 M、U、V 未知 d*d
矩阵,A 和 B 是已知的 d*d
矩阵,具有以下性质:
- U 和 V 是对角矩阵
- M 的主对角线项全部为 1
- A 和 B 是对称矩阵,它们的项已知
- M' 表示M 的转置。
请注意,(非线性)方程的总数和未知变量的总数相同,即。准确地说是d(d+1)。因此,它确保该系统拥有唯一的解决方案。
我尝试使用nleqslv
和等包在
。但他们的文档并未涵盖以矩阵形式输入未知数的情况。在最坏的情况下,我们可以手工编写所有方程,并利用上述包。不过,我正在寻找更好的方法。R
中以数值方式求解该系统>BB
任何帮助将不胜感激。即使有人建议其他可能在这方面有所帮助的编程语言或软件,那也没关系。谢谢。
I have encountered a very large system of non-linear equations which looks like:
- M'UM = A
- M'VM = B
where M, U, V are unknown d*d
matrices, and A and B are known d*d
matrices with the following properties:
- U and V are diagonal matrices
- The principal diagonal entries of M are all 1's
- A and B are symmetric matrices, and their entries are known
- M' denotes the transpose of M.
Note that both the total number of (non-linear) equations and the total number of unknown variables are same, viz. d(d+1) to be precise. So, it ensures that this system possesses a unique solution.
I was trying to solve this system numerically in R
using packages like nleqslv
and BB
. But their documentations do not cover instances where the unknowns are inputted in terms of matrices. In the worst case, we can write all the equations by hand, and make use of the aforementioned packages. However, I am looking for a better method.
Any help will be appreciated. Even if someone suggests some other programming language or software that might help in this regard, that'll be fine too. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了这个问题的部分解决方案。具体来说,我找到了一种方法来找到 M'UM = A 的解,给定 A,假设 A 是对称矩阵。
具体来说,每个实数对称矩阵都可以写成以下形式
其中 Q 由 X 的特征向量的正交集构成,D 的对角线包含相应的特征值。
来源。
使用 numpy,很容易获得特征值和特征向量:
然后,我在随机对称数组上尝试了这个:
结果:
果然,当你将这三个矩阵相乘时,你会得到原始的 A。
不幸的是,我不知道如何以满足两个方程的方式解决这个问题。
I found a partial solution to this problem. Specifically, I found a way to find a solution to M'UM = A, given A, assuming that A is a symmetric matrix.
Specifically, every real symmetric matrix can be written in the form
where Q is formed from an orthonormal set of eigenvectors of X and the diagonal of D contains the corresponding eigenvalues.
Source.
Using numpy, it's pretty easy to get the eigenvalues and eigenvectors:
Then, I tried this on a random symmetric array:
Result:
Sure enough, when you multiply those three matricies together, you get back the original A.
Unfortunately, I don't know how to solve this in a way that satisfies both equations.