Created
May 29, 2017 05:42
-
-
Save sanket143/61feb2e10b25dd1ee0cf993b3549b88b to your computer and use it in GitHub Desktop.
To calculate determinant of 2*2 matrix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var matrix = []; | |
function Solve(matrix) { | |
var Det = matrix[0][0]*matrix[1][1] - matrix[0][1]*matrix[1][0]; | |
return Det; | |
} | |
Solve([[1,2], | |
[3,4]]); // Here goes your matrix and you'll got you determinant; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment