Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't know BLAS or LAPACK, so I have no idea what may cause this behaviour.</p> <p>But, for matrices of the given form, calculating the inverse is quite easy. The important fact for this is</p> <pre><code>(J^T*J)^2 = (J^T*J)*(J^T*J) = J^T*(J*J^T)*J = &lt;J|J&gt; * (J^T*J) </code></pre> <p>where <code>&lt;u|v&gt;</code> denotes the inner product (if the components are real - the canonical <em>bilinear</em> form for complex components, but then you'd probably consider not the transpose but the conjugate transpose, and you'd be back at the inner product).</p> <p>Generalising,</p> <pre><code>(J^T*J)^n = (&lt;J|J&gt;)^(n-1) * (J^T*J), for n &gt;= 1. </code></pre> <p>Let us denote the symmetric square matrix <code>(J^T*J)</code> by <code>S</code> and the scalar <code>&lt;J|J&gt;</code> by <code>q</code>. Then, for general <code>a != 0</code> of sufficiently large absolute value (<code>|a| &gt; q</code>):</p> <pre><code>(a*I + S)^(-1) = 1/a * (I + a^(-1)*S)^(-1) = 1/a * (I + ∑ (-1)^k * a^(-k) * S^k) k&gt;0 = 1/a * (I + (∑ (-1)^k * a^(-k) * q^(k-1)) * S) k&gt;0 = 1/a * (I - 1/(a+q)*S) = 1/a*I - 1/(a*(a+q))*S </code></pre> <p>That formula holds (by analyticity) for all <code>a</code> except <code>a = 0</code> and <code>a = -q</code>, as can be verified by calculating</p> <pre><code>(a*I + S) * (1/a*I - 1/(a*(a+q))*S) = I + 1/a*S - 1/(a+q)*S - 1/(a*(a+q))*S^2 = I + 1/a*S - 1/(a+q)*S - q/(a*(a+q))*S = I + ((a+q) - a - q)/(a*(a+q))*S = I </code></pre> <p>using <code>S^2 = q*S</code>.</p> <p>That calculation is also much simpler and more efficient than first finding the LU decomposition.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload