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

Maya API [C++] - worldMatrix to translate

I'm new to Maya API/C++ in general and I'm trying to write a simple plugin. I have the relevant code pasted below but I have also attached dropbox link to a .zip if you'd prefer to download it as a package.…
ColinKennedy
  • 828
  • 7
  • 24
0
votes
2 answers

how to get inverse of modelview matrix?

I transformed a vector by multiplying it with the Model View matrix. glGetDoublev( GL_MODELVIEW_MATRIX, cam ); newX=cam[0]*tx+cam[1]*ty+cam[2]*tz+cam[3]; newY=cam[4]*tx+cam[5]*ty+cam[6]*tz+cam[7]; newZ=cam[8]*tx+cam[9]*ty+cam[10]*tz+cam[11]; How…
Shashi Mishra
  • 105
  • 2
  • 9
0
votes
1 answer

How to get the return value if an R function has an error

I want to test if a matrix is singular or not in R. I tried a function, which is is.non.singular.matrix() in matrixcalc package. However, sometimes, in my case there is a 60*60 matrix generated, the function returns FALSE, which means the matrix is…
Jiang Du
  • 189
  • 2
  • 14
0
votes
4 answers

Matrix operations in Java

I looked for this everywhere, but I am wrong somewhere. In my Java program, I created few 2D Arrays. Now, I need to form new 2D arrays with previous, like, inverse, transpose, multiplying , LEFT DIVISION and maybe even more. Some of them (simple) I…
Aleksandar
  • 1,163
  • 22
  • 41
0
votes
1 answer

Performing simple inverse and multiplication operations on Mat matrices

I have detected a number of points from 2 images. I am trying to find a transformation matrix between these 2 images. So I need to do an inverse of the matrix coordinates of one matrix and then multiply it to the coordinates of the other Mat matrix.…
Steph
  • 609
  • 3
  • 13
  • 32
0
votes
0 answers

Why matrix inverse computed by updation and pseudo-inverse is not matching? Matrix 'X' & 'r' are attached with the link shown below

Here you can find my data: Link 1, Link 2 and my code: D = X; Lr = r; % D = rand(10,5); %for random matrix, final result is matching % Lr = rand(1,5); B = eye(size(D,2))/(D'*D); Dx = [D;Lr]; BLr = B-((B*Lr'*Lr*B)/(1+Lr*B*Lr')); % Row addition…
0
votes
1 answer

Finding Matrix inverse using SIMPLEX Method

How can we find inverse of a matrix using Simplex method? Do we need to have square matrix only or inverse can be found of any matrix? Also specify about the upper bound on the matrix size?
phoenix
  • 81
  • 1
  • 9
0
votes
1 answer

2 Excel workbooks showing different results for the same calculation?

I have a workbook and I made a copy to make changes that should not affect the results (formatting) However, the new sheet gave me different calculation results when I finished. The first calculation that is off is a MINVERSE (matrix inverse array…
Michael Elkin
  • 221
  • 2
  • 4
  • 15
0
votes
1 answer

Calculating (A - B(D^-1)B^T )^-1 with CUDA

What might be the most efficient way of calculating the following expression using CUDA C ? (A - B(D^-1)B^T )^-1 where D is a very large symmetric matrix and A is a small symmetric matrix, which makes B and B^T medium sized rectangular…
hko
  • 139
  • 3
  • 10
0
votes
1 answer

Query regarding cusparseSolveAnalysisInfo_t

I need to solve Ax=B multiple times and cusparseSolveAnalysisInfo_t is taking huge time inside the loop. What does cusparseSolveAnalysisInfo_t do in the solution of AX=B? According to the documentation I can create it once and use it for different…
0
votes
1 answer

Singularity for inverse matrix

As data I get a matrix A but in my algorithm I need to work on its inverse. What I do is: C = inv(A) + B; Then in another line I update A. In the next cycles I also need (updated) A inverse, again for this algorithm. And so on. In the later cycles…
josh130
  • 305
  • 1
  • 5
  • 12
0
votes
2 answers

How do I turn a 2x3 matrix into a 3x3 matrix

I'm sorry if this is a stupid question but I just can't find the answer I need. I have the following matrix:- A |6 6 0| |9 0 0| Each column represents co-ordinates on a grid. Now to find the inverse of "A" I need to create this into a 3x3…
user2292173
  • 27
  • 1
  • 1
  • 5
0
votes
1 answer

Inverting a 4x4 Matrix algorithm

I'm trying to invert 4x4 matrices, I've seen some examples of calculating the determinant with a few dozens of calculations, this did not seem to work for me, I might've just messed up somewhere, but I've been trying to find another way to solve…
0
votes
3 answers

Inverse of a Matrix Python

I am trying to take the inverse of a matrix in Python and keep getting a syntax error. I am new to Python. After doing an internet search and trying multiple things, I am still not getting it. Can someone take a look at my code and point me in the…
0
votes
0 answers

Inverting rotation matrix swaps pitch and roll

I've got rotation matrix from TYPE_ROTATION_VECTOR vector values. and tried to use it to rotate an object in my app. Worked fine. But what I really want is to rotate an object opposite to the direction of device's movement. Say, device is rotated…
Nazerke
  • 2,098
  • 7
  • 37
  • 57