Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Fast matrix inversion

  1. Aug 28, 2011 #1

    I'm trying to find a fast way to solve the matrix equation [itex](A+pI)x=b[/itex], where A is a large matrix, I is the identity matrix, and p is a parameter whose value needs to be swept. Obviously I could just use mldivide or matrix inversion for every value of p, but this seems inefficient. Does anyone know of a better way? Thanks!
  2. jcsd
  3. Aug 28, 2011 #2
    Diagonalize the matrix [itex]A[/itex]:
    A \, U = U \, \Lambda
    where [itex]\Lambda[/itex] is a diagonal matrix whose diagonal entries are the eigenvalues [itex]\lambda_{i}[/itex] of [itex]A[/itex] and [itex]U[/itex] is a vector whose columns are the eigenvectors of [itex]A[/itex]. Then, we have:
    f(A) = U \, f(\Lambda) \, U^{-1}
    where by [itex]f(\Lambda)[/itex] we mean a diagonal matrix whose diagonal entries are [itex]f(\lambda_{i})[/itex].

    Now, notice that if you have [itex]A[/itex], diagonlaized, then:
    (A + p I) \, U = A \, U + p I \, U = U \, \Lambda + p U \, I = U \, (\Lambda + p I)
    where we have used the fact that [itex]I U = U I = U[/itex]. Here, [itex]\Lambda + p I[/itex] is again a diagonal matrix whose eigenvalues are [itex]\lambda_{i} + p[/itex]. Then, we will have:
    (A + p I)^{-1} = U \, \frac{1}{\Lambda + p I} \, U^{-1}
  4. Aug 28, 2011 #3

    Stephen Tashi

    User Avatar
    Science Advisor

Share this great discussion with others via Reddit, Google+, Twitter, or Facebook