Selected solution of linear equations

  • Context: Graduate 
  • Thread starter Thread starter Gabor Ladanyi
  • Start date Start date
  • Tags Tags
    Linear Linear equations
Click For Summary

Discussion Overview

The discussion revolves around solving a large number of systems of linear equations with a focus on obtaining specific elements of the solution vectors rather than the entire solutions. Participants explore various methods for efficiently addressing this problem, including LU factorization, Cramer's Method, and Gaussian elimination, while considering computational efficiency and accuracy.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant inquires about selective solvers for linear equations, specifically for extracting certain elements from the solution vectors of multiple systems.
  • Another participant suggests using LU factorization, proposing that placing the desired rows at the bottom of the matrix could save computation time during back substitution.
  • Cramer's Method is mentioned by a participant, who raises concerns about the number of calculations involved compared to LU factorization and notes potential issues with rounding errors.
  • One participant emphasizes that determinants are computationally expensive and not typically used for large matrices, while highlighting that LU factorization does not require calculating a determinant.
  • The original poster confirms that their matrices are non-singular and discusses using Gaussian elimination with selective back substitution to prioritize the calculation of interesting elements.
  • Concerns are raised about the trade-off between accuracy and speed when using pivoting in Gaussian elimination, with one participant suggesting that pivoting is relatively inexpensive and should generally be employed.
  • Another participant expresses a desire to refresh their knowledge on the topic, indicating a need for further study.

Areas of Agreement / Disagreement

Participants present multiple competing views on the best approach to solving the problem, with no consensus reached on a single method. There are differing opinions on the use of LU factorization versus Cramer's Method, as well as the role of pivoting in Gaussian elimination.

Contextual Notes

Participants express uncertainty regarding the computational efficiency of different methods and the implications of matrix conditioning on accuracy. The discussion highlights the complexity of selecting an appropriate method based on specific problem constraints.

Gabor Ladanyi
Hi All,

In my work I would like to solve a thousands of moderate size systems of linear equations, parallelly. The uniquum in my problem is that, I am not interested in the whole solutions of the systems, but only several elements of the solution vectors are interesting.

To be more strict:
Let a set of system of linear equations be given:
A(i)x(i)=y(i), i=1..N,
All the matrices A(i) and vectors y(i) are real.
The dimensions of the systems are equal and it is typical between 10 and 39.
The number of systems is typical N>5000.
The problem for example is to determine the x(i)1, x(i)3,
x(i)4 for all i=1..N.

The question: Have you ever heard any similar selective solver for linear equations? Direct and itterative solvers are also interesting for me.
Thank you for your help in advance!

G. Ladanyi
 
Physics news on Phys.org
LU factorization would probably suffice for what you are doing. If you are only looking for certain elements of the solution vector, then put those rows at the bottom of the matrix. When you back substitute, you will only need to do it for these bottom rows, which will save some computation time.
 
I was going to suggest Cramer's Method. I don't know if this is more or less calculations than LU factorization, though. (an important consideration with the number of different systems that you want to solve).

I don't remember exactly how LU works. I'd have to do some reading on it. I think with LU you do need to take the determinant of the matrix. I'm not sure what else.
With Cramer's Method, you would take 1 determinant plus a determinant for each element that you want to solve for, then divide. One concern that I could see is potential rounding, depending on how big the products that you generate, are.
 
scottdave said:
I don't remember exactly how LU works. I'd have to do some reading on it. I think with LU you do need to take the determinant of the matrix. I'm not sure what else.
With Cramer's Method, you would take 1 determinant plus a determinant for each element that you want to solve for, then divide. One concern that I could see is potential rounding, depending on how big the products that you generate, are.
Determinants are very computationally expensive and are almost never used to solve big matrices. LU factorization does not require one to find a determinant, it is basically a clever form of Gaussian elimination.

One question for the OP, are the matrices that you are using nonsingular?
 
NFuller said:
Determinants are very computationally expensive and are almost never used to solve big matrices. LU factorization does not require one to find a determinant, it is basically a clever form of Gaussian elimination.
Good to know. Like I said, it has been awhile, and I couldn't recall exactly how LU is used or calculated.
 
My matrices are non singular.

Gaussian elemination (GE) with selected back substituting seems to be good enough for the first glimps. I could substitute back only the interesting rows. It means, I choose the order of the soultion to generate the interesting elements first. When they are calculated I do not continue the calculation. (Order1)

Unfortunately, sometimes the matrices are badly conditioned and pivoting version of GE could be more accurate. If I know well, pivoting needs the changing of rows. It is almost "equal" with the selection of order of the solution. (Order2)

I am afraid, (Order1) and (Order2) are not the same, I have to choose between accuracy or speed.

I hope my ideas were clear... What do you think?
 
Pivoting is relatively cheap and will not cost you much speed, you should almost always do it.
 
Reading some of these posts and doing some searching of the terms, some of it is coming back, but I realize I have forgotten quite a bit.
 
To brush up, I'm considering this edX course: Linear Algebra - Foundations to Frontiers - LAFF for short. I've taken a couple of edX courses, and enjoyed them.
 

Similar threads

  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 23 ·
Replies
23
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K