Linear Algebra Problem #2 (Matrices actually)

In summary: I will try to explain it when I come back. Thanks!In summary, if two nxn diagonal matrices D1 and D2 commute, then the product of D1 and D2 is diagonal.
  • #1
Saladsamurai
3,020
7

Homework Statement



If a diagonal matrix is a square nxn matrix whose only nonzero entries occur in positions [itex]a_{ii},\ i=1,2,...,n[/itex] prove that the product of two nxn diagonal matrices, D1 and D2, is diagonal AND that D1 and D2 commute.

(HINT: Use D1=[[itex]d_{ij}[/itex]] and D2=[[itex]d'_{kl}[/itex]]

use the defintion of matrix multiplication to show that there is at most one non zero term in [tex]c_{il}=\sum_jd_{ij}d'_{jl}[/tex])



Homework Equations



Definition of matrix multiplication (This is where I have the most trouble)

For C=BA, [tex]c_{ik}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p[/tex]


:smile: So my biggest trouble stems from these really general definitions :yuck: I mean, I know they shouldn't be to difficult...I can multiply matrices with actual numbers in them, but this definition is giving me grief.

Can someone just kind of talk about this defintion with me for a minute?:redface: Then I can make a real attempt at a solution.

Thanks!
 
Physics news on Phys.org
  • #2
This definition is stupid. Why are there so many indexes for god's sake?
 
  • #3
It's not really very complex. You know that the (i,j)th element of C is just the dot product of the ith row of B and the jth column of A. Also, the row is specified by the first index and the column by the second index. The elements of the ith row of B are [tex] b_{ik} [/tex] where k goes from 1 to n. The elements of the jth column of A are [tex] a_{kj} [/tex] where k goes from 1 to n. Now the dot product is simply

[tex] \sum_{k=1}^nb_{ik}a_{kj} [/tex].
 
  • #4
a_{ik} is nonzero only if i=k if a is diagonal. b_{kj} is nonzero only if j=k if b is diagonal. c_{ij}=a_{ik}*b_{kj} with k summed over. i and j are NOT summed over. They are constants. The product can only be non-zero if both terms are nonzero. So i=k and k=j. If i is not equal to j, then there is no such k. Hence there are no nonzero terms in the sum. The sum must equal 0. So c_{ij}=0 if i is not equal to j. If i=j there is only one term in the sum, where k=i=j. So c_{ij}=c_{ii}=a_{ii}*b_{ii}. There. I talked about it for a minute. I timed it. You tell me why it's commutative. I.e. why is a_{ik}*b_{kj}=b_{ik}*a_{kj}. Review the previous. There are two cases, i=j and i not equal to j.
 
  • #5
Looks like you did a lot of typing there in a minute! I wish I followed you. This is the definition I am having trouble with:

[tex]
c_{ik}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p
[/tex]

I am having difficulty with this:
c_{ij}=a_{ik}*b_{kj} with k summed over. i and j are NOT summed over. They are constants

Does this mean that the only thing that changes in the summation is k for any particular ij entry? I think that is what you mean.

So I guess I understand that part now...moving on to the rest of what you wrote:redface:
 
  • #6
Yes, that's what I mean. But you meant c_{ij} in what you posted, yes? There are a lot of indices, and it's important to keep them straight. Actually, I wrote that in a minute, then spent several minutes correcting the index typos.
 
  • #7
Dick said:
Yes, that's what I mean. But you meant c_{ij} in what you posted, yes? There are a lot of indices, and it's important to keep them straight. Actually, I wrote that in a minute, then spent several minutes correcting the index typos.

Yes. Should be [tex]

c_{ij}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p

[/tex]

But I did not notice that I copied it wrong from the book until you just pointed that out!

Damn. Now I need to go over it again.
 
  • #8
And the matrix is nxn. So m=n and p=n. I believe you could handle this easily, as you said, if they were real matrices with real numbers in them. You just have to figure out how to abstract that knowledge to this notation. It's really saying the same thing. In a more confusing way.
 
  • #9
Dick said:
And the matrix is nxn. So m=n and p=n. I believe you could handle this easily, as you said, if they were real matrices with real numbers in them. You just have to figure out how to abstract that knowledge to this notation. It's really saying the same thing. In a more confusing way.

Yeah... it's just about to 'click'. I understood it for a second and then I lost it. So, I am going to get a snack. I will understand it when I come back. I can feel it!
 
  • #10
Dick said:
a_{ik} is nonzero only if i=k if a is diagonal. b_{kj} is nonzero only if j=k if b is diagonal. c_{ij}=a_{ik}*b_{kj} with k summed over. i and j are NOT summed over. They are constants. The product can only be non-zero if both terms are nonzero. So i=k and k=j. If i is not equal to j, then there is no such k. Hence there are no nonzero terms in the sum. The sum must equal 0. So c_{ij}=0 if i is not equal to j. If i=j there is only one term in the sum, where k=i=j. So c_{ij}=c_{ii}=a_{ii}*b_{ii}. There. I talked about it for a minute. I timed it. You tell me why it's commutative. I.e. why is a_{ik}*b_{kj}=b_{ik}*a_{kj}. Review the previous. There are two cases, i=j and i not equal to j.


Alrighty-then:smile: So I can intuitively see that the product of two nxn diagonal matrices is an nxn diagonal matrix. You've got a bunch of zeros everywhere in the matrices except along the major diagonals, so it's just kind of obvious.

Now, how to use the definition to write out a proof is proving to be a little more challenging as I am not used to the 'mechanics' and formalisms of matrices.

How do you start a proof?
 
  • #11
One of the things you can do is that since both matrices are diagonal matrices, you know that only elements for which i==j are non zero. As every thing else is zero, all other products will yield zero. So, you don't really need to evaluate the general definition, so long as you know how matrix multiplication is done, you can kind of visualize it and put that process in terms of the general definition.
 
  • #12
Like I said, I get the intuitive sense of it. But, how do I demonstrate the general case? I just need a hint as to what to start writing here. I want to try it on my own, but I am not sure how to start a proof.
 
  • #13
It's not really something that is formal, but here's what you can do. Denote the first diagonal matrix by A and the other B. The entries of the matrices A and B are [tex]a_{ij} \ \mbox{and} \ b_{ij}[/tex]

You know for all [tex]a_{ij} , b_{ij} = 0 [/tex] unless [tex]i=j[/tex]. So how can you write out the matrix multiplication of these two matrices in this "notation"? What is the matrix entry of C (matrix AB): [tex]c_{ij}[/tex]? After this is done, work out what a matrix entry of C' (matrix BA) should look like.

This should get you started.
 
  • #14
Saladsamurai said:
Alrighty-then:smile: So I can intuitively see that the product of two nxn diagonal matrices is an nxn diagonal matrix. You've got a bunch of zeros everywhere in the matrices except along the major diagonals, so it's just kind of obvious.

Now, how to use the definition to write out a proof is proving to be a little more challenging as I am not used to the 'mechanics' and formalisms of matrices.

How do you start a proof?

Casey, what I wrote in post #4 IS a proof. If you intuitively see something, just write clearly WHY it is intuitively clear and the result is likely to be a pretty acceptable proof.
 
  • #15
Dick said:
Casey, what I wrote in post #4 IS a proof. If you intuitively see something, just write clearly WHY it is intuitively clear and the result is likely to be a pretty acceptable proof.

:smile: Sounds good! I just always liked being able (from the little experience I have with proofs) to write out a proof symbolically without any words. I always thought that was the goal of a 'proof.' To show something is true or not true purely through symbols.

I should probably look at that 'hint' again if I still wish to do so.
 
  • #16
BTW: Looking back in the book, this: [tex]
c_{il}=\sum_jd_{ij}d'_{jl}
[/tex]

is actually written like this: (note the position of the j index after Sigma)

[itex]
c_{il}=\sum\ _jd_{ij}d'_{jl}
[/itex]

Is there a difference?

Usually when I see Sigma, there is a number or dummy variable underneath to give a starting point and then a number or dummy ABOVE it to denote the stopping point. Why is there not a stop on this one?
 
  • #17
Defennder said:
It's not really something that is formal, but here's what you can do. Denote the first diagonal matrix by A and the other B. The entries of the matrices A and B are [tex]a_{ij} \ \mbox{and} \ b_{ij}[/tex]

You know for all [tex]a_{ij} , b_{ij} = 0 [/tex] unless [tex]i=j[/tex]. So how can you write out the matrix multiplication of these two matrices in this "notation"? What is the matrix entry of C (matrix AB): [tex]c_{ij}[/tex]? After this is done, work out what a matrix entry of C' (matrix BA) should look like.

This should get you started.

I did not see this post Defennder.
So how can you write out the matrix multiplication of these two matrices in this "notation"?
This is where I get stuck... is this just the definition of multiplication:

[tex]


c_{ij}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p


[/tex]
?
 
  • #18
Saladsamurai said:
BTW: Looking back in the book, this: [tex]
c_{il}=\sum_jd_{ij}d'_{jl}
[/tex]

is actually written like this: (note the position of the j index after Sigma)

[itex]
c_{il}=\sum\ _jd_{ij}d'_{jl}
[/itex]

Is there a difference?

Usually when I see Sigma, there is a number or dummy variable underneath to give a starting point and then a number or dummy ABOVE it to denote the stopping point. Why is there not a stop on this one?

It may just be typographical sloppiness. I think those all mean the same thing. If all the matrices are nxn then it appears they omit the n for the upper limit. Uh, some people would omit the Sigma as well, and say the presence of the j index twice is enough reason to presume it will be summed. That's Einstein summation convention. It saves you a lot of time making Sigma's as these expressions get more and more complicated. So don't be too surprised they are getting sloppy...
 
  • #19
I seriously want to bash the life out of whoever wrote this book. How the hell am I supposed to use the definition of matrix multiplication: [itex]C=BA=c_{ij}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p[/itex]

to prove this using D1=d_ij and D2=d'_jl by showing there is at most one non zero term in [tex]
c_{il}=\sum_jd_{ij}d'_{jl}
[/tex]

Exactly WHAT IS c_il ? Is it one particular column in C ?

Basically, I am asking the question over, but I want to use the books way of answering it.

I am not trying to sound ungrateful for the help I have received thus far. It's just that I am looking ahead in the book and every goddamned question is just like this one... and if I don't get their methods now, I am going to be posting every single question in the book on PF. And I just can't bare to stare at a computer screen for that much time.:smile:
 
  • #20
Saladsamurai said:
[tex]c_{ij}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p[/tex]?
I take it that you mean p=m. Yes, and how about the entries of matrix AB? Examining the summation, which summands are non-zero? Clearly [itex]a_{ik}b_{kj} = 0 [/itex] iff either a_{ik} or b_{jk} is zero.
 
  • #21
Defennder said:
I take it that you mean p=m. Yes, and how about the entries of matrix AB? Examining the summation, which summands are non-zero? Clearly [itex]a_{ik}b_{kj} = 0 [/itex] iff either a_{ik} or b_{jk} is zero.

Does not say anything about p=m. This is the given definition of matrix multiplication.
 
  • #22
Saladsamurai said:
I seriously want to bash the life out of whoever wrote this book. How the hell am I supposed to use the definition of matrix multiplication: [itex]C=BA=c_{ij}=\sum_{k=1}^nb_{ik}a_{kj},\ i=1,...,m\ j=1,...,p[/itex]

to prove this using D1=d_ij and D2=d'_jl by showing there is at most one non zero term in [tex]
c_{il}=\sum_jd_{ij}d'_{jl}
[/tex]

Exactly WHAT IS c_il ? Is it one particular column in C ?

Basically, I am asking the question over, but I want to use the books way of answering it.

I am not trying to sound ungrateful for the help I have received thus far. It's just that I am looking ahead in the book and every goddamned question is just like this one... and if I don't get their methods now, I am going to be posting every single question in the book on PF. And I just can't bare to stare at a computer screen for that much time.:smile:

You have to calm down or you are not going to get anywhere. c_il is not a column or row. It's a single entry in the matrix. You are switching between different definitions of the same thing using different indices and conventions. The index letters themselves don't mean anything. That's why they are often called 'dummy' indices. The only way to understand the definitions is to stand back and say, "I understand how to multiply matrices", how does the definition say the same thing I already understand. Goddamn it.
 
  • #23
Saladsamurai said:
Does not say anything about p=m. This is the given definition of matrix multiplication.
Yes, but in this case you're working with diagonal matrices, which are square matrices. So both i and j range from 1 to n, the dimensions of the nxn matrices.
 
  • #24
Dick said:
It's a single entry in the matrix.

The only way to understand the definitions is to stand back and say, "I understand how to multiply matrices", how does the definition say the same thing I already understand. Goddamn it.

Both of these statements make sense. Thanks:smile:
 

1. What is a matrix?

A matrix is a rectangular array of numbers, symbols, or expressions arranged in rows and columns. It is a fundamental mathematical tool used to represent and manipulate systems of linear equations and transformations.

2. What are the different types of matrices?

There are several types of matrices, including square matrices, symmetric matrices, identity matrices, diagonal matrices, upper and lower triangular matrices, and zero matrices. Each type has its own unique properties and uses in linear algebra.

3. How do I add or subtract matrices?

To add or subtract two matrices, they must have the same dimensions (same number of rows and columns). You can add or subtract the corresponding elements in each matrix to get the resulting matrix. For example, to add two 2x2 matrices A and B, you would add A11 to B11, A12 to B12, A21 to B21, and A22 to B22.

4. How do I multiply matrices?

To multiply two matrices A and B, the number of columns in A must match the number of rows in B. The resulting matrix will have the same number of rows as A and the same number of columns as B. To find the value of each element in the resulting matrix, you would multiply the corresponding row of A by the corresponding column of B and add the products. This process is known as the dot product. Note that matrix multiplication is not commutative, meaning A*B does not necessarily equal B*A.

5. What is the inverse of a matrix?

The inverse of a square matrix A is another square matrix A-1 that, when multiplied by A, results in the identity matrix. Not all matrices have an inverse, and the inverse of a matrix can only exist if the determinant of the matrix is non-zero. The inverse is useful in solving systems of linear equations and for finding solutions to equations involving matrices.

Similar threads

  • Calculus and Beyond Homework Help
Replies
25
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
1K
  • Linear and Abstract Algebra
Replies
9
Views
896
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
5
Views
10K
  • Calculus and Beyond Homework Help
Replies
5
Views
2K
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Linear and Abstract Algebra
Replies
3
Views
2K
Back
Top