Questions tagged [determinants]

Anything related to the computation of matrix determinants. The determinant of a square matrix is a number, computed from the matrix elements, that is extremely important in matrix algebra and its applications (geometry, linear systems solving, etc.).

Anything related to the computation of matrix determinants. The determinant of a square matrix is a number, computed from the matrix elements, that is extremely important in matrix algebra and its applications (geometry, linear systems solving, etc.).

See Wikipedia on matrix determinants.

225 questions
2
votes
1 answer

Determinant in Fortran95

This code in fortran calculates the determinant of a nxn matrix using the laplacian formula (expansion by minors). I understand fully how this process works. But could somebody give me an insight into how the following code operates over, say a…
pi-e
  • 31
  • 1
  • 6
2
votes
0 answers

Overload c() or modify base::det?

I have overloaded the determinant function for a S4 class in R. The base determinant function returns a list with elements modulus and sign; the values, however, are my S4 objects (for which * is overloaded). I then redefined the det function (I had…
shabbychef
  • 1,940
  • 3
  • 16
  • 28
2
votes
1 answer

python determinant of a large matrix

I have a linear system of equations like MX=N. M is a 21x21 matrix with many elements zero. When I try to solve this system with X = np.linalg.solve(M, N), it gives me this error: numpy.linalg.linalg.LinAlgError: Singular matrix The problem here…
erjohn
  • 21
  • 4
2
votes
4 answers

Calculating an NxN matrix determinant in C#

How do you calculate the determinant of an NxN matrix C# ?
user347640
  • 213
  • 1
  • 4
  • 11
2
votes
1 answer

Given LUP decomposition of a matrix, how to find determinant in MATLAB?

I want to compute the determinant of a matrix from its LUP decomposition in MATLAB. The determinant can be found from the formula: P is a permutation matrix and S is the number of exchanges of rows needed to transform P into an identity matrix.…
user215721
  • 299
  • 2
  • 11
2
votes
3 answers

how to compute all the minors with a given order of a matrix in matlab

I have a matrix m*n, I want from it all the minors (the determinant of the submatrices) of order p. I din't found anything good in the documentation, I could do it with a function written by my self, but I'd prefer something out of the box. My real…
user1834153
  • 330
  • 5
  • 20
2
votes
1 answer

Determinant equal to 0 matlab

I'm learning how to use Matlab. I've a question about the matrix A: A=[1,2,3;4,5,6;7,8,9] Obviously the determinant should be equal to 0. But actually I got the value: 6.661338147750939e-016 What is wrong? I know it's pretty much zero. What I want…
2
votes
2 answers

Avoid numerical underflow when obtaining determinant of large matrix in Eigen

I have implemented a MCMC algorithm in C++ using the Eigen library. The main part of the algorithm is a loop in which first some some matrix calculations are performed after which the determinant of the resulting matrix is obtained and added to the…
Henrik
  • 14,202
  • 10
  • 68
  • 91
2
votes
4 answers

Determinant of huge matrix Java

I am making a project in Java where i have to use BigInteger class to implement an encryption method. I have square matrices nxn where n can be 200 and i need to calculate the determinant. I did the method using the determinant of submatrices but…
2
votes
1 answer

Jama - Matrix must be square exception while finding determinant

I am new to using Jama for matrices. My problem is while I'm using det() method (which is related with LUDecomposition class) it gives "Matrix must be square". Ok my matrix is triangle but with LUDecomposition it should give me square matrix. My…
sinan selimoglu
  • 103
  • 1
  • 8
2
votes
1 answer

Determinant matrix calculating in C through pipe function. revision code

Develop a program is performed using IPC mechanisms one of the following problems: The way - "Channels." Implement the computation of the determinant of a square matrix by expanding it on the determinants of lower order. The "master" process sends…
rustock
  • 387
  • 3
  • 6
  • 12
2
votes
4 answers

Computer Algorithm for Solving Determinants

I wanted a computer algorithm which could solve an n x n Determinant and return a value. Most recommendably in C++ language, where input is a 2D Array, and N, and output is the value. There is an exhaustive method in Mathematics to solve…
1
vote
1 answer

Function to get the determinant of a NxN matrix using laplace expansion in R (Error: argument of length 0)

determinant_laplace <- function(M, k = 1) { n <- nrow(M) det_value <- 0 sign <- 1 for (j in 1:n) { sub_matrix <- M[-k, -j] sub_det <- determinant_laplace(sub_matrix, k = 1) det_value <- det_value + sign * M[k, j] *…
1
vote
1 answer

Numpy/Scipy: Efficient Determinant of Gram Matrix

I need to compute the (log of the) determinant of the Gram matrix of a matrix A and I was wondering if there is a way to compute this efficiently and in a stable way in Numpy/Scipy. import numpy as np m, n = 100, 150 J = np.random.randn(m,…
Euler_Salter
  • 3,271
  • 8
  • 33
  • 74
1
vote
1 answer

c++ - implementing a multivariate probability density function for a likelihood filter

I'm trying to construct a multivariate likelihood function in c++ code with the aim of comparing multiple temperature simulations for consistency with observations but taking into account autocorrelation between the time steps. I am inexperienced in…