Reader small image

You're reading from  The Statistics and Machine Learning with R Workshop

Product typeBook
Published inOct 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781803240305
Edition1st Edition
Languages
Right arrow
Author (1)
Liu Peng
Liu Peng
author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng

Right arrow

Introducing the matrix determinant

The determinant of a matrix is a special scalar value that can be calculated from a matrix. Here, the matrix needs to be square, meaning it has an equal number of rows and columns. For a 2x2 square matrix, the determinant is simply calculated as the difference between the product of the diagonal elements and the off-diagonal elements.

Mathematically, suppose our 2x2 matrix is A = [a b c d ]. Its determinant, |A|, is thus calculated as follows:

det(A) = |A| = ad bc

Please do not confuse these vertical lines with the absolute operation sign. They represent the determinant in the context of a matrix, and the determinant of a matrix can be negative as well.

Let’s say our 2x2 matrix is A = [2 6 1 8]. We can find its determinant like so:

|A| = 2 * 8 6 * 1 = 10

Calculating the determinant of a matrix is the easy part, but understanding its use is of equal importance. Before we...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
The Statistics and Machine Learning with R Workshop
Published in: Oct 2023Publisher: PacktISBN-13: 9781803240305

Author (1)

author image
Liu Peng

Peng Liu is an Assistant Professor of Quantitative Finance (Practice) at Singapore Management University and an adjunct researcher at the National University of Singapore. He holds a Ph.D. in statistics from the National University of Singapore and has ten years of working experience as a data scientist across the banking, technology, and hospitality industries.
Read more about Liu Peng