Questions tagged [inverse]

For questions about computationally inverting a function/matrix/operation. The inverse "undoes" the action of the original operation, for example in the context of solving linear systems or differential equations.

Filter by
Sorted by
Tagged with
6 votes
1 answer
998 views

Why is matrix inversion unstable when svd is stable?

I've heard that matrix is inversion is unstable whereas the SVD is stable. Now, if $A$ is an invertible matrix, then its SVD is $$ A = USV^T $$ Then wouldn't it's inverse just be $$ A^{-1} = (USV^T)^{...
NNN's user avatar
  • 668
4 votes
1 answer
132 views

The error propagation in calculating the inverse using a matrix decomposition

I have been trying to calculate the matrix inverse of some large matrix with entries ranging by orders of magnitude. I tried to use the matrix decomposition to simplify the computation, where a matrix ...
ShoutOutAndCalculate's user avatar
3 votes
1 answer
95 views

SVD testing non zero values

I was looking at the matlab function pinv.m for the compuation of the pseudoinverse. The code uses the singular values decomposition. $$ A = U D V $$ When looking for non-zero diagonal elements it ...
pinpon's user avatar
  • 153
2 votes
0 answers
212 views

Numerical instability in the inverse Laplace transform

I have a problem with Laplace inversion and my function is not numerically stable for the Laplace inverse, but I do not understand the cause of this problem. Here is my code and graph of this problem. ...
Ali AlCapone's user avatar
1 vote
1 answer
551 views

MATLAB : find an algorithm to inverse quickly a large matrix of symbolic variables

I have to solve the equality between 2 matrixes 12x12 containing a lot of symbolic variables and with which I perform inversion of matrix. There is only one unknown called "...
user avatar
2 votes
1 answer
924 views

How to Invert a Poorly Conditioned Matrix

In my research, I need to invert a Fisher matrix in order to get a covariance matrix for me to do parameter estimation. Unfortunately, the values of Fisher matrix vary by many orders of magnitude, and ...
Brian.C.Seymour's user avatar
1 vote
0 answers
433 views

Optimize speed for calculating the approximate inverse of a large matrix

I am searching for a faster method to calculate an approximate inverse of a large matrix (up to 32000x32000) resulting from a discrete non-linear system of partial differential equations. I'm using C++...
enco909's user avatar
  • 11
4 votes
3 answers
1k views

Inverse of ill-conditioned symmetric matrix

I've got a matrix K, with dimensions $(n, n)$ where each element is computed using the following equation: $$K_{i, j} = \exp(-\alpha t_i^2 -\gamma(t_i - t_j)^2 - \...
adityar's user avatar
  • 143
5 votes
1 answer
99 views

approximate function such that the inverse of the approximation is "simple"

I have a smooth enough injective function $f:[a, b]\to \mathbb{R}$ which I want to approximate by something that can be computed quickly, e.g., a Padé approximant of low degree, $$ \frac{\sum_{j=0}^m ...
Nico Schlömer's user avatar
5 votes
1 answer
1k views

Fast algorithm for computing cofactor matrix

I wonder if there is a fast algorithm, say ($\mathcal O(n^3)$) for computing the cofactor matrix (or conjugate matrix) of an $N\times N$ square matrix. And yes, one could first compute its determinant ...
ZUN LI's user avatar
  • 53
4 votes
1 answer
478 views

Accurate way of getting the square root inverse of a positive definite symmetric matrix

What is the most accurate algorithm to get the square root inverse of a positive definite symmetric matrix? I am not looking as much for efficiency, though using quadruple precision computation is out ...
Javier Garcia's user avatar
2 votes
1 answer
110 views

Which pseudo-inverse to compute when Inverse is not possible? (No linear solve)

Let us assume that we have a function, $f(A)=\text{vec}(A^{-1})^\intercal B$, dependent on $A^{-1}$. However, due to some machine-precision limitations, the programming language I'm using cannot ...
An old man in the sea.'s user avatar
1 vote
1 answer
6k views

Computing the Inverse of a matrix, using the Cholesky decomposition

I have to compute $CA^{-1}B$ and $CA^{-1}x$, where $A,B,C$ are conformable matrices and $x$ is a vector. I've read that the a very computationally stable way to compute these inverses is by computing ...
An old man in the sea.'s user avatar
2 votes
1 answer
98 views

Inverting small matrices: canned factorization versus explicit formula

I am interested in solving a large number of small linear systems of equations, $Ax=b$, with $A$ either $2\times2$ or $3\times3$. Assuming none of these systems are actually singular, is there ...
Endulum's user avatar
  • 725
4 votes
1 answer
202 views

Do I really need to invert this matrix

I need to calculate a matrix $A$ (at least some elements of it, see below) as defined by the following equation $$ A=B(\mathbb{1}-B)^{-1} $$ where B is a square matrix of dimension $N$ and $\mathbb{...
zakk's user avatar
  • 247
7 votes
1 answer
3k views

How to directly compute the inverse of an ill-conditioned dense matrix

I know that it is generally a bad idea to compute the inverse matrix directly. However, if it is necessary to compute the inverse of an ill-conditioned invertible dense matrix, then what can I try? ...
nekketsuuu's user avatar
5 votes
1 answer
896 views

What is the fastest method to invert millions of matrices?

My project involves large simulation and estimation. For each simulation I need to solve 600,000 systems of nonlinear equations. Currently I am using Newton's method to find the solutions. That ...
THwang's user avatar
  • 53
1 vote
0 answers
90 views

How to fast estimate derivates for calculating quantiles

I would like to know if there exists a package or how one can fast calculate the quantiles of a function within python, where the inverse of the function for calculating the quantile depends on the ...
math's user avatar
  • 101
1 vote
2 answers
304 views

Inverting big symmetric and singular matrices

In this post I found a very similar probem to the one I have, but not a satisfactory answer for my purposes. I have a set of matrices $C_\ell$. They are exactly symmetric by construction. ...
johnhenry's user avatar
  • 129
0 votes
1 answer
164 views

Sparse matrix inverse with reduced bandwidth

I have a sparse symmetric matrix of dimension 1393x1393 (8308 no zero elements), with bandwidth 1380. By Cuthill–McKee algorithm, I could achieve a new matrix with ...
Jiang Du's user avatar
1 vote
0 answers
133 views

Problem in analyzing the program of Gauss Jordan Inverse problem

I had to code a program which calculates Inverse of a matrix by Gauss-Jordan Inverse method , I was trying to analyse the program and then code it myself. the link http://hullooo.blogspot.in/2011/...
BAYMAX's user avatar
  • 229
19 votes
2 answers
3k views

Practical example of why it is not good to invert a matrix

I am aware about that inverting a matrix to solve a linear system is not a good idea, since it is not as accurate and as efficient as directly solving the system or using LU, Cholesky or QR ...
Manu's user avatar
  • 449
1 vote
0 answers
48 views

Numerically inverting an exponentially growing function (defined by Chebyshev polynomials)

Assume a function $M(t)$ strictly increasing, essentially growing exponentially, and asymptoptically growing at a known rate $\bar{g}$, i.e. $\lim_{t\to\infty}M'(t)/M(t) = \bar{g}$ In a set of awful ...
jlperla's user avatar
  • 378
10 votes
1 answer
887 views

The fast, and The Backward-Stable (left) $3\times 3$ matrix inverse

I need to compute a lot of $3\times3$ matrix inverses (for Newton iteration polar decomposition), with very small number of degenerate cases ($<0.1\%$). Explicit inverse (via matrix minors divided ...
Sergiy Migdalskiy's user avatar
0 votes
1 answer
246 views

Fast computation of square root inverse of matrix, matrix being determined from Ax=b form

I have an equation of the form $J^Te=f$, where $e$ and $f$ are known vectors and $J$ is an unknown matrix. How can I efficiently compute $J^T(JJ^T)^{-1/2}e$ ? My motivation to address this problem ...
user3619023's user avatar
1 vote
1 answer
480 views

Calculate inverse of dense matrix with entries of very different magnitude

I need to calculate the inverse of a dense matrix, with some elements taking values as high as 1e9 and some around 1e2. What would be the best method to do it? Note: I am more concerned about the ...
user3496912's user avatar
17 votes
2 answers
14k views

Complexity of matrix inversion in numpy

I am solving differential equations that require to invert dense square matrices. This matrix inversion consumes the most of my computation time, so I was wondering if I am using the fastest algorithm ...
physicsGuy's user avatar
4 votes
1 answer
114 views

Finding the matrix inverse given a solver for the matrix equation $Ax=b$

So I'm given a solver that can solve for $x$ in the matrix equation $\underset{=}{A} \underline{x} = \underline{b}$ where $b$ can be anything we specify. (NB: A is an NxN matrix). I now want to find ...
SomePhysicsStudent's user avatar
1 vote
2 answers
195 views

Inverse of "diagonally not dominant matrix"

I want to frame a higher order Central difference scheme of about $20^{th}$ order for first derivative. I'm using $20^{th}$ order because I need one scheme with good modified wave number. To find the ...
AGN's user avatar
  • 544
4 votes
1 answer
478 views

Obtaining column vectors of pseudo-inverse of a matrix

I need to compute the pseudo-inverse of a very large rectangular dense matrix without any special structure or properties. I run out of memory/computing power and have no access to a large parallel ...
Dr Krishnakumar Gopalakrishnan's user avatar
2 votes
0 answers
56 views

Inverted value is not consistent with expectation

We have a group of observations $$y = f(x_1, x_2, x_3) \enspace .$$ We have also a forward model $y = f(x_1, x_2)$. The forward model does not include $x_3$ because $x_3$ might include dozens of ...
Ting Yang's user avatar
8 votes
0 answers
770 views

What is the source of the error in the Sherman-Morrison formula application?

The Sherman-Morrison formula $$ (A+uv^T)^{-1} = A^{-1} - \frac{A^{-1}uv^TA^{-1}}{1+v^TA^{-1}u} $$ results in small errors in relation to the standard matrix inverse operation after each application, ...
rcpinto's user avatar
  • 180
3 votes
3 answers
804 views

Exact analytical matrix inversion of sparse 100x100 matrices in C++

I need to invert a matrix. Of course, I'm not the first person in this situation, and I know that there's a wealth of powerful libraries out there, of which I only know a couple. That being said, ...
carsten's user avatar
  • 133
6 votes
1 answer
622 views

Is there a faster method to compute the geometric series of a matrix?

I want to calculate the geometric series of a matrix $A$: $$S=I+A+A^2+\dots+A^n$$ and then apply to a vector $v$, $Sv$. I've done it in Matlab with a loop and I think it's quite efficient applying ...
jinawee's user avatar
  • 171
1 vote
1 answer
2k views

computing the inverse of a large block diagonal sparse matrix in r

I would like to compute the inverse of some large block diagonal sparse matrix. The number of rows and columns is somewhat over 50,000. The blocks are 12 by 12 and are sparse (27 non zero elements). ...
user3499209's user avatar
3 votes
0 answers
62 views

Dominant contributions of a quadratic form

Let $\Sigma$ be a covariance matrix (e.g. symmetric positive definite). For arbitrary vectors $\epsilon$, I need to compute $\chi^2 \equiv \epsilon^\top\Sigma^{-1}\epsilon$, which I do using a ...
yannick's user avatar
  • 375
1 vote
0 answers
191 views

Efficient way to do congruent transformation using matrix inverse?

I know a square self-adjoint matrix $S_{vv}$ and I want to find: $S_{rr} = HS_{vv}H^{\dagger}$ where $\dagger$ denotes conjugate transpose. I do not know $H$ but I do know $H^{-1}$. What is the ...
James's user avatar
  • 11
0 votes
2 answers
506 views

closed form approximation of matrix inverse with special properties

I'm trying to find some theory to help me explicitly express the inverse of a matrix (or a close approximation of the inverse). My matrix has the following properties: invertible positive definite ...
John's user avatar
  • 109
5 votes
2 answers
1k views

Perturbation of Cholesky decomposition for matrix inversion

I am looking for a computationally cheap way to compute $x$ such that $$(L L^T + \mu^2 I)x = y$$ where $L \in \mathbb{R}^{n \times n}$ is a lower triangular definite positive matrix (with some very ...
Mathieu Galtier's user avatar
9 votes
0 answers
517 views

Updating matrix diagonal with Woodbury matrix identity and maintaining numerical accuracy

I have a dense matrix A and its corresponding inverse $A^{-1}$. The Woodbury matrix identity states: $$ (A + UCV)^{-1} = A^{-1} - A^{-1}U(C^{-1} + VA^{-1}U)^{-1}VA^{-1} $$ I wish to perform small ...
Costis's user avatar
  • 1,320