# Homework Help: Determinant of a general matrix with variables.

1. Dec 16, 2012

### peripatein

Hi,
1. The problem statement, all variables and given/known data

I was asked to find the determinant of the following two matrices (please see attachment).

2. Relevant equations

3. The attempt at a solution

I know that the determinant of the matrix on the left is [(-1)^(n-1)]*(n-1), but I have no idea how to formally derive that, nor prove it.
And I have no idea how to find the determinant of the matrix on the right.
Could anyone please guide me through?

#### Attached Files:

• ###### Determinants.jpg
File size:
15.4 KB
Views:
129
2. Dec 16, 2012

### aralbrec

Try row reducing the matrices to upper triangular form before finding the determinant.

3. Dec 16, 2012

### peripatein

I am not sure how to achieve that, and I DO know what an upper triangular form is.

4. Dec 16, 2012

### aralbrec

I'll do the first row operation for the first matrix:

row2=row2-row3

(determinant doesn't change)

We're trying to get rid of the ones to the left of the main diagonal and that can be done for each row by looking at the row below, except for the last one.

5. Dec 16, 2012

### aralbrec

peripatein, I just worked it out to make sure it was alright. The pattern for the row(n-1)=row(n-1)-row(n) generates -1,1 along the diagonal and zero elsewhere in the row. I set lastrow=lastrow-firstrow to get a 1 in the first column and a -1 in the last. The determinant can be evaluated using the last row and cofactor expansion.

One of the determinants is then zero but the other has a bunch of 1s in the first row. You can get that one into upper triangular form fairly easily with the help of some row exchanges (and the -1 multiplier on the determinant that entails).

6. Dec 16, 2012

### peripatein

Alright, thank you very much!
What about the second matrix, the one on the right, with diagonal 1,2,..,n?

7. Dec 16, 2012

### Michael Redei

How about subtracting the matrix with all entries equal to n from that second one?

EDIT: Sorry, that was nonsense.

8. Dec 16, 2012

### aralbrec

I think the same approach will work. Get rid of the n entries below the main diagonal with the same row subtraction done for the other matrix. The lastrow=lastrow-firstrow will leave a non-zero entry in the first entry around which a cofactor expansion can be done. Then you are left with a matrix that should be fairly easy to get into upper triangular form.

9. Dec 16, 2012

### peripatein

I was unable to attain an upper triangular form in the latter case. May you please assist? We may simplify it and first examine the procedure on a 3x3 matrix.

10. Dec 16, 2012

### Michael Redei

Subtract the last row from each other one.

Last edited: Dec 16, 2012
11. Dec 16, 2012

### Dick

Hey Michael, there is such a thing as giving too much help. I think that's way too much. Just give the hint, ok?

Last edited: Dec 16, 2012
12. Dec 16, 2012

### Michael Redei

I've removed the bulk of my last post.

13. Dec 16, 2012

### Dick

Thanks. That's better, right? Let's see where peripatein goes with that.

14. Dec 16, 2012

### aralbrec

That certainly makes it easier lol.

15. Dec 17, 2012

### HallsofIvy

Have you at least tried the 2 by 2 and 3 by 3 cases to get an idea of what you should do?

16. Dec 17, 2012

### peripatein

Of course, and for a 3x3 got:
{1-n 0 n-3},{0 2-n n-3},{n n 3}
Which still left me stuck.
How shall I proceed?

17. Dec 17, 2012

### Dick

n is the size of the matrix. Here n=3.

18. Dec 17, 2012

### peripatein

This is merely an example, in order to determine the general algorithm.

19. Dec 17, 2012

### Dick

Ok, but since n-3=0 your matrix is lower triangular. That's Michael Redei's hint is all about.

20. Dec 17, 2012

### peripatein

Ok, so I got:
n*PI (i-n), where i runs from 1 to n-1.

Should this expression be simplified further/presented differently, or is this indeed how it should be formulated?