Solving Singular Matrix in MATLAB

  • Context: MATLAB 
  • Thread starter Thread starter ysun8@uic.edu
  • Start date Start date
  • Tags Tags
    Matrix
Click For Summary
SUMMARY

The discussion centers on handling singular matrices in MATLAB when attempting to compute their inverse. Users explore the technique of adding a small identity matrix, specifically 0.00005 times the identity matrix, to the diagonal of a singular matrix to facilitate inversion. The example provided illustrates the comparison between directly solving a singular matrix and modifying it with a small identity matrix. The consensus indicates that while this method can yield a result, it is often a workaround for underlying issues in the data or matrix formulation.

PREREQUISITES
  • Understanding of singular matrices in linear algebra
  • Familiarity with MATLAB syntax and operations
  • Knowledge of matrix inversion techniques
  • Basic concepts of numerical stability in computations
NEXT STEPS
  • Research MATLAB's 'pinv' function for computing the pseudoinverse of matrices
  • Learn about regularization techniques for improving matrix conditioning
  • Explore the implications of numerical stability in matrix computations
  • Investigate alternative methods for solving linear equations with singular matrices
USEFUL FOR

Mathematics students, data scientists, and engineers working with MATLAB who need to understand matrix operations and handle singular matrices effectively.

ysun8@uic.edu
Messages
1
Reaction score
0
singular matrix ?

Hi, guys,

< in MATLAB >
what should i do if i want to get the inverse matrix but it's a singular one? can i just add a very small identity matrix like 0.00005 on the diagnol? will it change the result?

eg:

w0 = S\meandiff

is that the same as

w0 = ( S+0.00005*eye( size( S ) ) )\meandiff


thanks!
 
Physics news on Phys.org
Usually if you get a singular matrix, you screwed up somewhere before the inverting step.

cookiemonster
 

Similar threads

Replies
8
Views
4K
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
7K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K