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

as.integer(8952) = 8951?

I accidentally discovered a weird bug with either the as.integer or the det function in R base. Does anyone know what is going on here and how to prevent it? I was computing the determinant of the following 3-by-3 matrix: mat <- matrix(c(15, 6, 116,…
Vincent
  • 677
  • 2
  • 7
  • 19
2
votes
0 answers

Finding the determinant of a Matrix bigger than 3X3 C#

In my Matrix class I was able to write my own code for matrices up to 3X3 class Matrix { public float Determinant() { if (!isSquare()) return 0; else if (_rows == 1) return this[0, 0]; else if…
I NN_
  • 139
  • 6
2
votes
1 answer

Recursive Function using MPI library

I am using the recursive function to find determinant of a 5x5 matrix. Although this sounds a trivial problem and can be solved using OpenMP if the dimensions are huge. I am trying to use MPI to solve this however I cant understand how to deal with…
2
votes
1 answer

Find largest value from multiple colums in each group of row index in Python, arrange those values diagonally in matrix, and find determinant

I am new to Python. I want to find the largest values from all the columns for repetitive row indexes (i.e. 5 to 130), and also show its row and column index label in output.The largest values should be absolute. (Irrespective of + or - sign). There…
axay
  • 437
  • 5
  • 19
2
votes
2 answers

Gaussian elimination without result for acceleration

I'm working on a C library (for myself, code: https://github.com/BattlestarSC/matrixLibrary.git) to handle matrix functions. This is mostly a learning/practice activity. One of my challenges is to take the determinant of a matrix efficiently. As my…
Eric
  • 35
  • 2
2
votes
1 answer

Random matrix with determinant not zero in Maxima

I want to generate a matrix with random entries such that the determinant of that matrix is not zero using Maxima and further down the line implement this in STACK for Moodle. I am completely new to working with Maxima (or any CAS for that matter),…
Hirshy
  • 157
  • 4
2
votes
0 answers

Matrix determinant implementation in template matrix class

I'm working on a project which requires me to write my own matrix class implementation. I decided to implement the matrix class as a template to provide compile-time error-checking in the following way: template // N × M…
nodivo
  • 29
  • 2
2
votes
1 answer

C - Recursive algorithm calculating determinant of a 2D matrix

I want to recursively calculate the determinant of a 2D matrix, according to the definition of cofactors and their use in calculating the determinant. My code is: double **supr_mat(int size, double mat[size][size], int nb_colonne) { double…
Desperados
  • 434
  • 5
  • 13
2
votes
2 answers

generating matrices that correspond to the loop value

My goal is to evaluate execution times between two different functions that output the same result. I am looking at np.linalg.det() and a function I made called mydet(). For each loop, I would like to generate a n x n matrix with n being in the…
fowlerd8
  • 57
  • 6
2
votes
3 answers

Is there any use for the determinant of a 4x4 matrix in computer graphics?

In most graphics libraries I've seen, there's some function that returns the determinant from 3x3 and 4x4 matrices, but I have no idea when you'd actually need to use the determinant in 3D computer graphics. What are some examples of using a…
karamazovbros
  • 950
  • 1
  • 11
  • 40
2
votes
1 answer

Computing the logdeterminant of a Sparse Matrix in Julia

I'm interested in computing the log of the determinant of a large, sparse, complex (floating point) matrix. My first thought is to use an LU decomposition, i.e.: srand(123) A=complex.(rand(3,3), rand(3,3)) LUF=lufact(A) LUFs=lufact(sparse(A)) if…
MDM
  • 65
  • 1
  • 6
2
votes
0 answers

Lapack routine dgesv: system is exactly singular: U[2,2] = 0

I am trying to use R's solve() function to find the solution to a system of linear equations. The coefficients matrix is 2X2. My code below is written into an R file that I execute after it finished being written. Before calling solve, I check to…
maddie
  • 1,854
  • 4
  • 30
  • 66
2
votes
1 answer

Numpy slogdet computation error

There appears to be a major difference between numpy's slogdet and the exact result when computing the log determinant of Vanermonde matrix. I compare against the exact log determinant, see eg here for proof. The minimal code to see this is: A =…
j__
  • 248
  • 1
  • 11
2
votes
3 answers

Calculate log of determinant in TensorFlow when determinant overflows/underflows

My cost function involves the calculation of log(det(A)) (assuming the det(A) is positive so the log makes sense, but A is not Hermitian so that the Cholesky decomposition is not applicable here). When det(A) is very large/small, a direct call to…
Everett You
  • 259
  • 4
  • 12
2
votes
0 answers

Applying Matrix Chio's Law

I am trying to apply Chio's law on my program. You may not be familiarized with Chio's Law (or know it by other name), here in Brazil we call it Lei de Chió (Chio's Law), I could not find it's english equivalent. Here is how it goes: Say we have a…