# How to count the total # of non-invertible 2x2 matrices

• xsw001
In summary, the conversation discusses counting the total number of non-invertible 2x2 matrices over the finite field Z_r, where r is a prime number. The answer is determined to be r^3 + r^2 - r and is achieved by considering different groups of matrices with specific forms. The conversation also delves into the idea of infinite and uncountable matrices, but ultimately concludes that the number of non-invertible 2x2 matrices over Z_r is finite.

#### xsw001

Can anyone explain to me how to count the total # of non-invertible 2x2 matrices?

I have the answer from the book, which is r^3+r^2-r provided r is a prime. But it doesn't explain how to get there, and I couldn't figure it out. I haven't been practicing linear algebra for quite a long time.

I know a 2x2 matrix is non-invertible iff the determinant is zero, and a matrix is non-invertible iff rows (columns) are linearly dependent, one row (column) must be a scalar multiple of the other.
If we have a 2x2 matrix A:
a b
c d
A is non-invertible iff det(A) = ad-bc = 0
If I have a set of number r that is prime to choose from for each entry in the matrix. It's easier to play with the zeros, but then I got very confused when it combines with the numbers.

Can anyone be so graciously helping me out and explain it in detail? Many thanks!

I'm afraid I don't understand your question. Do you mean the number of matrices with entries from $Z_r$?

Last edited by a moderator:
I believe you do mean to count the matrices over the field $$\mathbb{Z}_r$$. The count is done as follows:

group A of matrices are of form [a,b; c,d] with $$a\neq 0$$ and $$d=\dfrac{bc}{a}$$. This is $$(r-1)r^2=r^3-r^2$$ matrices.

Groups B, C are of form [0,b;0,d] and [0,0;c,d] - each has $$r^2$$ members. However, they share the common set of r matrices of form [0,0; 0,d]. Therefore, gorups B,C have $$2r^2-r$$ elements.

Alltogether it is the required number. Convince yourself that the mentioned forms are exactly those an non-invertible matrix can take.

The total number is not only infinite, its not numerable; its isomorphic to the Real Line (or complex plan for that matter). Matrices [[a b][c d]] of the form a*d = b*c are uncountable, because we can always find real number pairs a*d such that there exists a real pairs (or complex ones) b*c such that a*d=b*c. So I think that the size is beth-one; the following article may suggests that its larger (beth-two) because it says the functions from R^m to R^n is that size (let m=n), and that would include a 2-by-2 matrix. However, we are considering a considerably different class of matrices, namely the non-invertible ones (so this is a much smaller set of matrices).
Anyway, to answer a simple question, simply: THERE ARE A LOT of (INFINITE) such matrices.

jshtok said:
I believe you do mean to count the matrices over the field $$\mathbb{Z}_r$$. The count is done as follows:

group A of matrices are of form [a,b; c,d] with $$a\neq 0$$ and $$d=\dfrac{bc}{a}$$. This is $$(r-1)r^2=r^3-r^2$$ matrices.

Groups B, C are of form [0,b;0,d] and [0,0;c,d] - each has $$r^2$$ members. However, they share the common set of r matrices of form [0,0; 0,d]. Therefore, gorups B,C have $$2r^2-r$$ elements.

Alltogether it is the required number. Convince yourself that the mentioned forms are exactly those an non-invertible matrix can take.

I'm not sure where you get the equation $$(r-1)r^2=r^3-r^2$$ from, but it seems wrong...

xsw001 said:
Can anyone explain to me how to count the total # of non-invertible 2x2 matrices?

I have the answer from the book, which is r^3+r^2-r provided r is a prime. But it doesn't explain how to get there, and I couldn't figure it out. I haven't been practicing linear algebra for quite a long time.

I know a 2x2 matrix is non-invertible iff the determinant is zero, and a matrix is non-invertible iff rows (columns) are linearly dependent, one row (column) must be a scalar multiple of the other.
If we have a 2x2 matrix A:
a b
c d
A is non-invertible iff det(A) = ad-bc = 0
If I have a set of number r that is prime to choose from for each entry in the matrix. It's easier to play with the zeros, but then I got very confused when it combines with the numbers.

Can anyone be so graciously helping me out and explain it in detail? Many thanks!

Do you mean, assuming the elements of the matrix are prime... your question isn't clear enough... please specify.

brydustin, the question concern matrices over the finite field $$\mathbb{Z}_r$$, which has r elements. Hence the finite count.

It would be nice if xsw001 would come back and tell us if that really is the case!

## 1. How do you determine if a 2x2 matrix is invertible?

A 2x2 matrix is invertible if its determinant (ad-bc) is not equal to 0. If the determinant is 0, then the matrix is not invertible.

## 2. How do you count the total number of non-invertible 2x2 matrices?

To count the total number of non-invertible 2x2 matrices, you can use the formula (n^2) - |det|, where n is the size of the matrix and |det| is the absolute value of the determinant. In this case, n=2, so the formula becomes (2^2) - |det| = 4 - |det|.

## 3. Can you provide an example of a non-invertible 2x2 matrix?

One example of a non-invertible 2x2 matrix is [1 2; 2 4]. The determinant in this case is 0, making the matrix non-invertible.

## 4. Why is it important to know the total number of non-invertible 2x2 matrices?

Knowing the total number of non-invertible 2x2 matrices can help in various mathematical calculations and can also provide insight into the properties of invertible matrices.

## 5. Are there any shortcuts or tricks to counting the total number of non-invertible 2x2 matrices?

One shortcut is to remember that the total number of 2x2 matrices is 4 and the number of invertible matrices is 1. Therefore, the total number of non-invertible matrices is 4-1=3. However, this shortcut may not work for larger matrices.

Replies
5
Views
1K
Replies
11
Views
3K
Replies
13
Views
2K
Replies
2
Views
414
Replies
9
Views
4K
Replies
3
Views
1K
Replies
9
Views
2K
Replies
2
Views
2K
Replies
1
Views
448
Replies
2
Views
1K