Tuesday, December 30, 2008

GATE 2000 CS question 1.3 (Matrix Algebra)

1.3. The determinant of the matrix:
2
0
0
0
8
1
7
2
2
0
2
0
9
0
6
1
is:
(a) 4 (b) 0 (c) 15 (d) 20

Explanation (answer at the end):

The method for finding the determinant of any nXn matrix is:
Multiply each element of a main row by the determinant of the matrix formed by removing its row and column from the original matrix.
Ok, that might not have been very clear. I'll explain...
Take one row or column as the 'main' row (or column) for calculation (from here on I'll call it the 'main row', though in some problems choosing a column might be better and so we must do that.) For each element of the main row, find the (n-1)X(n-1) matrix formed by removing the row and column of the current element.
For example, let's choose the first row here. In it, the first element is 2. We now form a 3X3 matrix by removing the row and column in which 2 is present. So, we end up with:
1
7
2
0
2
0
0
6
1
Now, we have to find the determinant of this matrix. The method is again the same, choose a row or column, find the smaller matrix. Now, since we're going to multiply, we can save ourselves some work if we find a row or column with many zeros, because multiplication by them is gonna give only 0's anyway, so we can avoid those calculations.
Here, the first column has all but one element as 0's. So, we choose that one.
The smaller matrix we get now is:
2
0
6
1

The value of this is, 2X1 - 0X6 = 2. Now, we must multiply this by the element of the 3X3 matrix we chose, which is 1. So, 2X1 gives 2 again. Since the other elements of the column are 0, our calculation for this 3X3 matrix ends here.
Now, we have to multiply this 3X3 matrix's determinant value by the element we chose in the original 4X4 matrix. We chose 2 once upon a time, remember?
So, the value now is: 2X2 = 4.
Now, in this case, we were just lucky, and the first row of the original matrix has 0's for all other elements. So, our calculations end here and the answer is 4.
In general, an important rule for solving determinant problems is: choose the row or column that has the maximum number of 0's, in order to minimize calculations.

Answer: (a) 4

2 comments:

Prasanth Guruprasad said...

option (a)

Sundar said...

Yeah, dumb mistake... :) Corrected it. Thanks.