In this section we work on applications of determinants to computations of areas and volumes. Computing areas and volumes of parallelepipeds (highdimensional parallelograms) and tetrahedrons (high-dimensional triangles) has many applications in engineering. In order to build a blueprint for a building or a ship, you need to partition a complicated object into parallelepipeds or/and tetrahedrons to measure the volume or area of the object. Therefore fast computation is important. Therefore, in this working example we will discuss how to efficiently compute volumes of a parallelepiped and a tetrahedron.

Then we create vectors of these four points in the three-dimension as:

x <- c(4, 1, 3, 0)
y <- c(0, 2, 5, 3)
z <- c(0, 5, 1, 0)

Then we define color intensity:

intensity <- c(0, 0.33, 0.66, 1)

Then we use the plot ly() function to visualize the tetrahedron:

Example

library(pracma)
A <- matrix(c(0, 1, 3, -1, -1, 1, -4, 0, 1, 0, 2, 4, 0, 1, 0, -4),
nrow = 4, ncol = 4, byrow = TRUE)
det(inv(A))
## [1] 0.03333333

===Practical Application===

A <- matrix(c(4, 0, 0, 1, 1, 2, 5, 1, 3, 5, 1, 1, 0, 3, 0, 1),
nrow=4, ncol=4, byrow=TRUE)
det(A)
## [1] -86