Questions tagged [matrix-inverse]

The matrix inverse, A^{-1}, is a mathematical relationship such that given a square n x n matrix A, A*A^{-1} = A^{-1}*A = I, where I is the identity matrix. Use this tag with regards to any numerical methods or computations that require the use or calculation of the matrix inverse.

Computation of the inverse of a square matrix, provided it is invertible (i.e., full-rank), is often via LU factorization. When the matrix is positive-definite, Cholesky factorization is often used. In standard numerical linear algebra library , dgesv and dpotrf respectively performs LU and Cholesky factorization.

In reality it is rare that a matrix inverse needs be explicitly formed, and matrix multiplications involving a matrix inverse is done by one of the factorizations above, and a triangular system solving.

509 questions
0
votes
1 answer

undefined reference to `gsl_linalg_complex_LU_decomp_'

I am new to this Forum. I have recently started learning c++ as it is required for my work. I have installed GSL library and BLAS on Ubuntu 12.04. I have written code to compute matrix exponential, which works fine with the gsl library. I now have…
OPP
  • 1
0
votes
1 answer

Matlab: Error in inverse operation when implementing Kalman filter

I am trying to implement the basic Equations for Kalman filter for the following 1 dimensional AR model: x(t) = a_1x(t-1) + a_2x(t-2) + w(t) y(t) = Cx(t) + v(t); The KF state space model : x(t+1) = Ax(t) + w(t) y(t) = Cx(t) + v(t) w(t) =…
SKM
  • 959
  • 2
  • 19
  • 45
0
votes
1 answer

How Matrix Inversion is done in "krige" function of gstat package of R tool

I am in the midway of understanding how gstat package in R tool implements kriging method. I have understood the calculation of empirical semivariogram and fitting semivariogram models. But I did not understand how it implements the matrix inversion…
Chandan
  • 764
  • 2
  • 8
  • 21
0
votes
1 answer

The column sum of symmetric matrix inverse?

Given a symmetric matrix L, and the inverse of L is difficult to solve. Is there any other way to calculate the sum( inverse(L)(:,i) ) ?
Alex
  • 21
  • 2
0
votes
3 answers

I am getting a wrong answer for the linear equation solving by matrices in matlab

>> K=[6,31,221;31,221,1801;221,1801,15665] K = 6 31 221 31 221 1801 221 1801 15665 >> f=[31;197;1543] f = 31 197 1543 >> lambda=inv(K)*f lambda…
user4306253
0
votes
0 answers

R function solve: How small can the reciprocal of condition number be?

I have a function which takes an inverse of a matrix, say mat. I would like to take an inverse only if the matrix is invertible using solve function. So, I would like to make some check statement like; if (rcond(mat) > smallnumb) { smat <-…
FairyOnIce
  • 2,526
  • 7
  • 27
  • 48
0
votes
0 answers

faster alternatives to solve()

If chol2inv(chol(matrix)) is not applicable to my matrix (not a positive-definite square matrix), is there any other alternative methods in R to do matrix inversion (or avoiding the inversion). I am attempting to invert matrices of size 10K by 10K…
SOUser
  • 610
  • 1
  • 11
  • 25
0
votes
1 answer

How to multiply matrix of nxm with matrix nxmxp different dimensions in matlab

In my current analysis, I am trying to multiply a matrix (flm), of dimension nxm, with the inverse of a matrix nxmxp, and then use this result to multiply it by the inverse of the matrix (flm). I was trying using the following code: flm =…
0
votes
1 answer

Matlab: Determinant of VarianceCovariance matrix

When solving the log likelihood expression for autoregressive models, I cam across the variance covariance matrix Tau given under slide 9 Parameter estimation of time series tutorial. Now, in order to use fminsearch to maximize the likelihood…
SKM
  • 959
  • 2
  • 19
  • 45
0
votes
1 answer

Matlab: Confusion related to Correlation operation for lags

I have a time series model y(t)= h^T y(t-1) + n(t) where n(t) is a white Gaussian noise that excites and drives the process. y is the output of a linear regression model for t = 1,2,... denoting the number of data points. Question: If the…
SKM
  • 959
  • 2
  • 19
  • 45
0
votes
0 answers

Incorrect values of matrix inverse

I am learning about Hill Ciphe and need to find the inverse of the matrix to decrypt my ciphertext. I googled and found some excellent material on matrices. They even let you download the source code of the entire program. To test out the program…
Computernerd
  • 7,378
  • 18
  • 66
  • 95
0
votes
0 answers

error with matrix inverse only when matrix created through script

A=[ 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0; 1 -3 1 0 0 0 0 0 0 1 0 0 0 0 0 0; 0 1 -3 1 0 0 0 0 …
0
votes
0 answers

How to compute inverse matrix more precisely?

I ran some code: size <- 5 G < -matrix(c(0,1,0,0,1, 1,0,1,1,0, 0,1,0,1,1, 0,1,1,0,1, 1,0,1,1,0), ncol=size) # Max <- rep(0,4) delta <- 0.299 results <- rep(0,16) results <- matrix(results,…
Keyu Nie
  • 41
  • 1
  • 1
  • 4
0
votes
0 answers

Matrix Inverse algorithm doesnt work inside my Code

My group and I are trying to create a bridge simulation. For that we need to calculate the inverse of a big matrix. So we got an open source algorithm which after testing it with this site:…
0
votes
3 answers

How to compute huge diagonal matrix inverse (dim 14000*14000)

How to compute the inverse of a huge (dim 14000*14000) matrix? I am trying that with R and an error message has been shown as : Error: cannot allocate vector of size 762.9 Mb I know that indicates a failure to obtain memory. Any help would be…