Showing posts with label matrix. Show all posts
Showing posts with label matrix. Show all posts

Thursday, April 9, 2009

GATE 2001 CS question 1.1 (Matrix Algebra)

1.1 Consider the following statements:
S1: The sum of two singular n X n matrices may be non-singular.
S2: The sum of two n X n non-singular matrices may be singular.
Which of the following statements is correct?
(a) S1 and S2 are both true. (b) S1 is true, S2 is false.
(c) S1 is false, S2 is true. (d) S1 and S2 are both false.
This is one problem where getting too theoretical can get you stuck. Instead, let's try to come up with simple examples. The one I immediately thought of for S1 was:



11
11

and


1-1
-11

Both these matrices are singular. What does 'singular' mean? It simply means that the determinant of the matrix is zero (if you don't remember how the determinant of a matrix is found, please see this post). Now, what is their matrix sum? It is:


2
0
0
2

Now quick, what is the determinant value of this one? It's 2 X 2 - 0 X 0 = 4. Clearly, this sum is not 0, so the resulting matrix is non-singular. So, we've proved that S1 is true. The second case is still easier. Let's take the matrices


10
01

and


-10
0-1

Now, both of them have a determinant value of 1, and so they are not singular. What's their matrix sum then?


00
00

Wow! That's very clearly a singular matrix - it's determinant can't be anything other than 0. So, two non-singular matrices can also give a singular matrix on addition. This means that S2 is also true.

So, the answer is: (a) S1 and S2 are both true

Monday, March 23, 2009

GATE 2002 CS question 1.6 (Group theory)

1.6 Which of the following is true?
(a) The set of all rational negative numbers forms a group under multiplication
(b) The set of all non-singular matrices forms a group under multiplication
(c) The set of all matrices forms a group under multiplication
(d) Both B and C are true

To answer this question, we must know what a 'group' is.
In maths, a group is a set of things along with an 'operation' on them that are in such a way that:

(i) whenever you apply the operation to any element (or elements) of the set, you get another element of the same set.
For eg., let's take the set of integers and the operation of multiplication. Whenever you multiply two integers, you always end up with another integer. So this group (which consists of the set of integers and multiplication) satisfies this property. And the property is called 'closure'.

(ii) when the same operation is applied in an expression more than one time, the order in which you do the operations doesn't matter.
For eg., in the same group as above, let's say we have a*b*c (a,b,c being integers and * representing multiplication). Then, we all know that it doesn't matter whether we do (a*b)*c or a*(b*c), the result will be the same. This property is fancily known as 'associativity'.

(iii) there's a particular element, say 'i', such that doing the operation on any other element, say 'x', with this 'i' will again return 'x'. That just means that the operation leaves the element 'x' unchanged, when the other operand is 'i'.
If that seems complicated, after the example you'll see it's a very simple thing. In the same group as above, take any element of the set of integers, multiply it by 1, you'd get the same element right? That is what this property says. It tries to generalize it by saying that for any group, there must be an element in the set which leaves the other element unchanged when the operation is applied on them both. This element is called the 'identity element' and the property is aptly called the 'identity' property.

(iv) for any element 'x' in the set, there exists another element say 'y', such that when the operation is applied on these two, we get the identity element. This 'other element' y is called the inverse of x, and the property is called invertibility.
Let's try this property in the same old group: what is the inverse of 6? Oops... It is 1/6 (since 6 * 1/6 = 1), and that surely isn't in the set of integers. So, this doesn't satisfy the invertibility property, so what we've been calling a group all along is not a group at all! (it's a monoid, in case you're interested)

Now that we have an idea of what a group is, let's attack the original question:

In (a), multiplying a negative number with another gives us a positive number which is outside the set. Hence closure itself isn't satisfied, so it's not a group.

Let's analyze (b). Multiplying two matrices gives another matrix, so closure is there. (A*B)*C is the same as A*(B*C) in matrices too, so associativity also works. You'd have heard of this I matrix which has 1's in the diagonal and 0's everywhere else, and gives the same matrix when multiplied i.e. A*I = A for all A. So that's our identity element. And given that the matrices are non-singular (which means their determinant is not zero), inverse exists for all of them. Hence invertibility too holds. So, it seems this is the group we want.

So, what's wrong in (c)? Well, by saying 'all matrices', it has included singular matrices too, which do not have an inverse. So, it cannot form a group.

Hence, (b) The set of all non-singular matrices forms a group under multiplication is the answer.

Sunday, March 22, 2009

GATE 2002 CS question 1.1 (Matrix Algebra)

1.1 The rank of the matrix
1 1
0 0
is:
(a) 4 (b) 2 (c) 1 (d) 0
What's this 'rank' of a matrix? Well, it's the count of how many rows of the matrix can stand independently. What that means is: how many rows there are such that they cannot be formed just by multiplying other rows by something and adding them up.
Here, it is obvious that the second row can be obtained by multiplying the first row by 0. So, the rank is 1.
Another, maybe clearer, way to arrive at the same answer is: the row rank of any matrix (what we found above) is equal to its column rank. Here, we see that the two columns are equal. So, the second column is 'dependent' on the first column (or you may take it the reverse way). Either way, there's only one 'independent' column, hence the column rank is 1.
Here the answer is (c) 1