How to solve linear equation with singular Matrix?
37 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a problem with the solution this linear equations AX=B, when A,X and B are matrices. The matrix A is singular matrix. Matrices A and B have just only 1 and 0.
0 comentarios
Respuestas (3)
Ibrahim Albaik
el 10 de Feb. de 2020
I have the same problem and still looking for solutions?
1 comentario
John D'Errico
el 11 de Nov. de 2020
Please don't use an answer just for a me too response. Learn about comments.
Rore
el 11 de Nov. de 2020
Editada: Walter Roberson
el 11 de Nov. de 2020
see the solution in this link
0 comentarios
John D'Errico
el 11 de Nov. de 2020
A difficult question to answer, because there is no unique solution, and very likely, there is no exact solution. Really, it comes down to linear algebra 101. And possibly, you are trying to solve the problem in GF(2), thus the field of integers modulo 2. That would further complicate the problem.
What does it mean to try to solve the linear system A*x = b, for a square matrix A? Essentially, when you multiply a matrix A by any vector, you form a linear combination of the columns of the matix A. That is, A*x combines the columns in a way defined by the vector x. But when the matrix is singular, it is true that some of the columns of the matrix can be written as themselves a linear combination of the other columns. So there is no unique solution, even if a solution exists. And the odds are good that no exact solution will exist.
The standard example, (assuming you are not trying to work in GF(2)) is to use a pseudo-inverse. That is found in pinv, where the solution will be
x = pinv(A)*b;
Or, you could use lsqminnorm, but only in newer releases of MATLAB. (introduced in R2017b.) It will do as well.
Note that the pinv based solution will produce, since there are infinitely many solutions, the one where the vector x has minimum norm. (Note the name lsqminnorm.)
None of the above applies in the case of a GF(2) problem of course, but then you really should be careful in how you work with such a matrix, because you cannot use the traditional linear algebra tools in MATLAB.
0 comentarios
Ver también
Categorías
Más información sobre Linear Algebra en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!