Handling Singular matrices in Algorithms

In summary, the conversation is about solving for the system Ax=B when A is not square or has a determinant of 0. The person is asking for help on finding alternative methods to Gaussian Elimination. Some suggestions include applying regularization or using Rank-Deficient Least Squares methods. Another question is also raised about how transposing A affects its inverse.
  • #1
beanz
4
0
Hi All

I'm new to this forum so please be kind :)

I am doing a project on handling singular matrices in algorithms.

Basically what i have to do is to find out how to solve the system Ax=B when A is not square or det(A)=0. Because it does not have an inverse, I don't know what to do or how to approach this problem. Any help would be appreciated


P.S I tried the Guassian Elimination Method, but I have to find another way
 
Physics news on Phys.org
  • #2
beanz said:
P.S I tried the Guassian Elimination Method, but I have to find another way

What was wrong with gaussian elimination? I had a similar problem a while back (specifically, I needed to do it numerically) and I finally settled on writing a gaussian elimination routine.
 
  • #3
You could apply some sort of regularization. e.g. instead solve:

[tex]
(A^T A + \lambda I) x = A^T b
[/tex]

(for your favorite λ > 0)

The system is no longer singular, but the answers you get will be biased away from the actual solutions. In particular, the answer will be unique, instead of getting a bunch of solutions.


I don't think this would help with Gaussian elimination, though. I share SpaceTiger's question -- what's wrong with it?
 
  • #4
Thanx Guys,

I really appreciated your help. Nothings wrong with the gaussian elimination method. I just have to find out "various" ways of solving the system and tha Gaussian Elimination is just another method.

I have another question. Consider A , an n*n matrix which is invertible, and A^-1, its inverse. If A is transposed, how would it affect A^-1. (in other words how can i find the inverse of the Transpose of A without solving [A|I])

Thanx in advence
 
  • #5
Look up Rank-Deficient Least Squares methods.
 

Related to Handling Singular matrices in Algorithms

1. What is a singular matrix?

A singular matrix is a square matrix with a determinant of zero. This means that the matrix is not invertible and does not have a unique solution. In other words, there is no way to perform certain mathematical operations on a singular matrix, making it difficult to handle in algorithms.

2. Why do we need to handle singular matrices in algorithms?

In many algorithms, we use matrices to represent data or perform calculations. However, if a matrix is singular, it can cause problems such as division by zero or undefined results. Therefore, it is important to handle singular matrices in algorithms to ensure the accuracy and stability of the calculations.

3. How can we detect a singular matrix?

One way to detect a singular matrix is to calculate its determinant. If the determinant is equal to zero, then the matrix is singular. We can also use other methods such as Gaussian elimination or LU decomposition to check for singularity.

4. What are some common methods to handle singular matrices in algorithms?

One common method is to use a pseudo-inverse or generalized inverse to find a solution. Other methods include regularization, re-scaling the matrix, or using a different algorithm altogether. The best approach will depend on the specific problem and the desired outcome.

5. Can a singular matrix be used in algorithms at all?

Yes, sometimes singular matrices can still be used in algorithms with some modifications. For example, in machine learning, we can use regularization techniques to handle singular matrices and still obtain meaningful results. However, in most cases, it is best to avoid using singular matrices in algorithms if possible to prevent errors and inaccuracies.

Similar threads

  • Linear and Abstract Algebra
Replies
1
Views
856
  • Linear and Abstract Algebra
Replies
2
Views
763
  • Linear and Abstract Algebra
Replies
6
Views
1K
Replies
34
Views
2K
  • Linear and Abstract Algebra
Replies
1
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
925
  • General Math
Replies
2
Views
310
  • Linear and Abstract Algebra
Replies
2
Views
1K
  • Programming and Computer Science
Replies
6
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
3K
Back
Top