If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Linear algebra

### Unit 2: Lesson 5

Finding inverses and determinants

# n x n determinant

Defining the determinant for nxn matrices. An example of a 4x4 determinant. Created by Sal Khan.

## Want to join the conversation?

• Is it possible to find the determinant of an mxn matrix? Or is the determinant only defined for an nxn matrix?
• Yes... determinants are only for square matrices ( nxn ) ...
• Why did u make the ex. matrix have at have straight lines like | | rather than the matrix border like [ ]?
• He's trying to find the determinant of the matrix, which is written with the || lines instead of the [] brackets for the matrix. If you go back to the video on the determinants of 2x2 matrices, Sal talks about the various notations used for the determinant.
• The computations done here is like taking a cross product. Does this connection have any significance?
• Yes, it sure does! In fact, for people that are familiar with determinants, there is an easy way to remember how to take the cross product:

First, given two vectors a & b in R^3.
Next, the Cross product
a x b
is obtained by taking the determinant of the matrix C, where:

|C| =
| i j k |
|a1 a2 a3|
|b1 b2 b3|

[Note: I'm having some trouble typing out this matrix--it's supposed to be a 3x3 square matrix]

i.e. the elements in the first row are the unit vectors in the x, y, & z directions, respectively, and the second row is the vector a and the third row is the vector b.

The main difference is that instead of ending up with a single number (as you normally do when calculating a determinant), you end up with a vector (because of the unit vectors in the top row).
I personally have always had trouble remembering the formula for the Cross Product of two vectors and so this different approach has been really helpful.

Hope this helps!
• I think that the 2 by 2 matrix determinant can be defined by the recursion as well, if we make the determinant of a 1x1 matrix just the value of the entry in the matrix. Is that right?
• yes, a determinant for a 1x1 matrix is itself i.e. det([x])=x
so for a 2x2 matrix
det( [[a b] , [c d]] ) = a*det([d]) - b*(det([c]) =ad-bc
it makes sense that a 1x1 matrix has a determinant equal to itself,
because[a] [x] = [y] , or
ax=y
this is easily solvable as x=y/a, but the solution for x is undefined when
a=0=det([a])
• Is it correct to say the number of Non-invertible transformations are less 'dense'(in a loose and not rigorous sense) than invertible transformations? Considering the number of solutions where the determinant is equal to zero is less the the number of solutions where the determinants are equal to anything else, in fact the ratio of non-invertible transformations to invertible transformations is infinitesimal, correct?
• Yes, there are "a lot less" non-invertible transformations than there are invertible ones.

• it seems to me that calculating the determinant quite often would take more time computationally than just doing the operations to get the rref of the matrix in question if you were just trying to find out if a matrix is invertible since at the very first non-pivot column or zeroed row you could stop operations.

Furthermore if you take the effort to get the rref of a matrix it only doubles the number of operations to actually get the inverted matrix at the end which seems to be valuable information if you are interested in if the matrix was invertible in the first place.

it just seems to me that the determinant might not be very valuable information in application. Is there some part of this that I'm missing? Is it actually a significant reduction in computational time to find inverses with determinants? I could see it possibly being computationally less time if we know ahead of time that the matrix is invertible to begin with. But how much so? I've been told that finding the rref is approximately O(1/3n^3). What is the determinate?
• The algortihm shown here, Laplace's Algortihm for finding determinants, has a horrendous O(n!). Another propular algorithm, LU-Decomposition is a mere O(n^3), so it's much, much better.

Additionally the determinant does many things beside telling you whether or not theres an inverse.
• How do I know that if the determinant of this general matrix is 0, then the matrix is not invertible?
• Remember that for a matrix to be invertible it's reduced echelon form must be that of the identity matrix.

When we put this matrix in reduced echelon form, we found that one of the steps was to divide each member of the matrix by the determinant, so if the determinant is 0, we cannot do that division, and therefore we cannot put the matrix in the form of the identity matrix, and therefore the matrix is not invertible.
• What are you talking about? The thing he is showing in the video is Laplace expansion.
• At , should Sal have said & written +/- a sub1n times the DETERMINANT of A sub 1n instead of just a sub1n times A sub1n ?
• He meant to say that it could have been a + OR - depending on whether n was odd or even respectively, since the signs alternate.
(1 vote)
• This question isn't exactly related to this video, but I'd be grateful if you could help. I saw this one theorem where It said:

If A is an n x n matrix, then the following are equvalent:
( 1 ) det A cannot be equal to 0
( 2 ) rank (A) = n
( 3 ) A is invertible.

I don't understand the first condition. Isn't it true that is 2 rows are the same in a matrix, then the determinant is 0?

e.x.:
| 1 2 3 |
| 0 1 4 |
| 0 1 4 |

This is an n x n matrix right? and the det is 0 right?
(1 vote)
• Yes, that is an nxn matrix. The theorem is not saying that every nxn matrix has non zero determinant, it's saying that an nxn matrix is invertible if and only if the determinant is not 0.

You found an nxn matrix with determinant 0, and so the theorem guarantees that this matrix is not invertible.

What "the following are equivalent" means, is that each condition (1), (2), and (3) mathematically mean the same thing. It is not saying that every nxn matrix has a nonzero determinant. The theorem says if a matrix is nxn, then conditions (1), (2), and (3) mathematically mean the same thing.