** det()** function in R Language is used to calculate the determinant of the specified matrix.

Syntax:det(x, …)

Parameters:

x:matrix

**Example 1:**

`# R program to illustrate ` `# det function ` ` ` `# Initializing a matrix with ` `# 3 rows and 3 columns ` `x <` `-` `matrix(c(` `3` `, ` `2` `, ` `6` `, ` `-` `1` `, ` `7` `, ` `3` `, ` `2` `, ` `6` `, ` `-` `1` `), ` `3` `, ` `3` `) ` ` ` `# Getting the matrix representation ` `x ` ` ` `# Calling the det() function ` `det(x) ` |

*chevron_right*

*filter_none*

**Output:**

[, 1] [, 2] [, 3] [1, ] 3 -1 2 [2, ] 2 7 6 [3, ] 6 3 -1 [1] -185

**Example 2:**

`# R program to illustrate ` `# det function ` ` ` `# Initializing a matrix with ` `# 3 rows and 3 columns ` `x <` `-` `matrix(c(` `3` `, ` `2` `, ` `6` `, ` `-` `1` `, ` `7` `, ` `3` `, ` `2` `, ` `6` `, ` `-` `1` `), ` `3` `, ` `3` `) ` ` ` `# Getting the matrix representation ` `x ` ` ` `# Getting the transpose of the matrix x ` `y <` `-` `t(x) ` `y ` ` ` `# Calling the det() function ` `det(y) ` |

*chevron_right*

*filter_none*

**Output:**

[, 1] [, 2] [, 3] [1, ] 3 -1 2 [2, ] 2 7 6 [3, ] 6 3 -1 [, 1] [, 2] [, 3] [1, ] 3 2 6 [2, ] -1 7 3 [3, ] 2 6 -1 [1] -185

## Recommended Posts:

- Getting the Modulus of the Determinant of a Matrix in R Programming - determinant() Function
- Getting a Matrix of number of columns in R Programming - col() Function
- Getting a Matrix of number of rows in R Programming - row() Function
- Check if the Object is a Matrix in R Programming - is.matrix() Function
- Convert a Data Frame into a Numeric Matrix in R Programming - data.matrix() Function
- Convert an Object into a Matrix in R Programming - as.matrix() Function
- Transform the Scaled Matrix to its Original Form in R Programming - Using Matrix Computations
- Getting and Setting Length of the Vectors in R Programming - length() Function
- Getting Match of an Element within a Vector in R Programming - charmatch() Function
- Getting class of different data types in R Programming - class() Function
- Getting type of different data types in R Programming - typeof() Function
- Getting String Representation of the given Date and Time Object in R Programming - strftime() Function
- Getting Kernel Density Estimates in R Programming - density() Function
- Return a Matrix with Lower Triangle as TRUE values in R Programming - lower.tri() Function
- Compute Choleski factorization of a Matrix in R Programming - chol() Function
- Get or Set Dimensions of a Matrix in R Programming - dim() Function
- Calculate the Sum of Matrix or Array columns in R Programming - colSums() Function
- Calculate the Mean of each Column of a Matrix or Array in R Programming - colMeans() Function
- Calculate the cross-product of a Matrix in R Programming - crossprod() Function
- Calculate the cross-product of the Transpose of a Matrix in R Programming - tcrossprod() Function

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.