Solving Linear Equations with Poorly Conditioned Matrices

matematikawan
Messages
336
Reaction score
0
I have a system of linear equations which can be expressed as XA=Y where X and Y are row vectors. The vector Y and the matrix A are given. I need to solve for X.
I can rephrase the same equation as AtXt=Yt but the answer will still be the same.

I try using MATLAB to solve for X using the commands X=Y/A or X=Y*inv(A). Matlab do give an answer but it comes with the message

"Warning: Matrix is close to singular or badly scaled.
Results may be inaccurate. RCOND = 2.336280e-028. "

I have check that the determinant of A is not zero although it is near zero. Hence A is not singular. The problem may be due to condition number of the matrix A, I think. What does the RCOND in the message meant?

If I still want to solve the equation although the matrix is badly condition, what a better method should I use?
 
Physics news on Phys.org
Here's a link to a page for matlab's rcond function: http://www.nacs.uci.edu/dcslib/matlab/matlab-v53/help/techdoc/ref/rcond.html
 
Last edited by a moderator:
rcond is the reciprocal of the condition of A. Thanks Mark. So my matrix A is badly condition. The answer obtained is not reliable. However not much I can do about it because the matrix A is a given matrix with entry number in the range [0,1]. In my work (i discretize pde) I only change Y.

Is there any hope for me, say using other method, to solve the equation with reliable answer?

I see there is also a thread on Condition number.
https://www.physicsforums.com/showthread.php?t=350038

I will be following that also, in case there are helpful response.
 
I'm from that thread you linked. My method of solving a poorly conditioned system is to use a nonlinear solver.

If you have a system Ax = b then you can program a function in MATLAB to take an input of x and the output would be Ax - b.

I.E. F(x) = Ax - b (which ideally equals 0 for the desired value of x).

In this case, you'd want to find the zeros of F to find the solution to x. Matlab's built in fsolve function works well here. Be warned though, as was the case in my problem, since the matrix A is poorly conditioned, yes it will give you a solution but it may not be a good solution.
 
I hope you don't mind that I put the link to your thread here. Now I can understand better what you had written in your previous post (the one at your started thread).

The only nonlinear numerical method that I know is the Newton-Raphson method (NR). I do not know what algorithm is behind the MATLAB nonlinear solver fsolve().

The NR that I know required an initial estimation for the zero because nonlinear equation in general can have more than one root. This is an extra information that we have to supply which we shouldn't be doing because our equations have only one zero.

Also the algorithm behind the NR still required it to solve system of linear equations. So it back to square one, the problem with the condition number.




ps. Actually to which forum should I post questions on numerical method?
 
I asked online questions about Proposition 2.1.1: The answer I got is the following: I have some questions about the answer I got. When the person answering says: ##1.## Is the map ##\mathfrak{q}\mapsto \mathfrak{q} A _\mathfrak{p}## from ##A\setminus \mathfrak{p}\to A_\mathfrak{p}##? But I don't understand what the author meant for the rest of the sentence in mathematical notation: ##2.## In the next statement where the author says: How is ##A\to...
The following are taken from the two sources, 1) from this online page and the book An Introduction to Module Theory by: Ibrahim Assem, Flavio U. Coelho. In the Abelian Categories chapter in the module theory text on page 157, right after presenting IV.2.21 Definition, the authors states "Image and coimage may or may not exist, but if they do, then they are unique up to isomorphism (because so are kernels and cokernels). Also in the reference url page above, the authors present two...
When decomposing a representation ##\rho## of a finite group ##G## into irreducible representations, we can find the number of times the representation contains a particular irrep ##\rho_0## through the character inner product $$ \langle \chi, \chi_0\rangle = \frac{1}{|G|} \sum_{g\in G} \chi(g) \chi_0(g)^*$$ where ##\chi## and ##\chi_0## are the characters of ##\rho## and ##\rho_0##, respectively. Since all group elements in the same conjugacy class have the same characters, this may be...
Back
Top