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
0
votes
1 answer

can't get exact result for Determinant

first of all im new on c.i try get a determinant of nxn matrix with this code double Determinant(double *A, int N){ int i; int j; int k; double y[100][100]; double x[100][100]; int sign = 1; double result = 0; int arrayRow; int arrayColumn; for(i…
0
votes
2 answers

Value cannot be resolved

The purpose of the below code snippet is to create an instance of a matrix and then calculate the determinant of an nxn matrix. However, method computeDet won't return because the following error occurs: value cannot be resolved to a variable. Why…
Kastrasza
  • 1
  • 1
0
votes
1 answer

2D array losing values without being manipulated?

I am reading data from a simple data file 'matrix.dat', eg: 1 2 3 4 5 6 7 8 9 I read through the file and save data points in a 2D array: else /// Read data from file. { // Check matrix is square and find number of columns/rows. n =…
LMStaples
  • 3
  • 1
0
votes
1 answer

Determinant calculation error

#include #include #include double Det (double a[2][2], int size); void form(double a[2][2], int c, int size); double b[2][2]; double Det(double a[2][2], int size) { if (size==1) { return a[0][0]; } else { …
DVB
  • 1
  • 2
0
votes
2 answers

How can I make a c++ program to find the determinate and inverse of any sized matrix?

I know how to find these in a 1x1 2x2 and 3x3 but I want to make a program that lets me enter the dimensions of my matrix and then enter the numbers that go in the matrix. After entering the numbers I want it to give the determinate (if able to get…
Matthew
  • 1
  • 1
0
votes
2 answers

Using recursion and dynamic memory allocation of multidimensional arrays to find the determinant of an NxN matrix

I'm trying to write a program that can calculate the determinant of any NxN matrix regardless of the size but there's something wrong with the program and it crashes for any matrix with size greater than 1. I'd be very grateful to anyone who can…
theintegral
  • 11
  • 1
  • 1
0
votes
1 answer

Confirm I understand matrix determinants

Basically I have been trying to forge an understanding of matrix maths over the last few weeks and after reading (and re-reading) many maths heavy articles and documentation I think I have an adequate understanding, but I just wanted to make…
Adam Naylor
  • 6,172
  • 10
  • 49
  • 69
0
votes
1 answer

calculate determinant of matrix

i am surprised why following algorithm shows me ,that matrix is not invertible,i have input identity matrix,here is my code for calculate teterminant float determinant(float a[5][5],float k) { float s=1,det=0,b[5][5]; int i,j,m,n,c; …
user466534
-1
votes
1 answer

Determinant of a small complex matrix within a GPU thread

The problem is to compute the determinant of a complex matrix (5x5, 4x4, and 3x3) from a device function within a particular thread. Efficiency is crucial, as the original problem involves computing thousands of such matrices in a for loop within…
Physicist
  • 1
  • 4
-1
votes
2 answers

How to make a minor of a matrix using vectors C++

I am making a program for calculating a determinant of a matrix in C++ and I want to do so by using vectors, after this I will make a program that inverts a matrix, but I will do that afterwards. I don't have much experience using vectors, so I…
-1
votes
1 answer

How to find the sum of determinant of matrices present inside a list in R?

I am trying to find the sum of determinant of matrices present inside a list using lapply. In the list not all items are a matrix. I have a list with three elements e.g. [[1]] Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 …
falconed
  • 29
  • 3
-1
votes
2 answers

How to select N rows from dataset, arrange as matrix, find its determinant?

I want to take first N rows of my dataset arrange it as a matrix (such that N>=No. of columns) i.e. 6 in this case, find the determinant of |Matrix.T*Matrix|, so my final matrix product will be a 6x6 matrix. Set the 1st Column 'Serial_no' as…
axay
  • 437
  • 5
  • 19
-1
votes
1 answer

Runtime and space complexity of the recursive determinant algorithm for a n x n matrix

I am trying to figure out the runtime and space complexity of the algorithm below. Some say that the runtime complexity of this is O(n!) and I am guessing it is because there are n! recursive calls for a recursive algorithm that solves for a n*n…
-1
votes
1 answer

Correlation Measures for Multiple Variables in R

I am trying to create a function in R to find a correlation coefficient for n-dimensional non-zero-variance variables using the equation seen at the bottom of this image: Click Here So far, I have only made the example data-set I am working with: a…
Al G
  • 43
  • 2
  • 7
-1
votes
1 answer

Determinant of matrix with recursion

The code below calculates the determinant of a matrix of order q recursively. It works for q=3 and q=2 but for q=4 it outputs garbage values which change every time I run the program: What is going wrong here? #include #include…
Stormlight
  • 161
  • 3
  • 10
1 2 3
14
15