   Understanding Matrix Multiplication
  I'm beginning to learn, in-depth, about matrices.  I'm using this website to help me:MatricesIn part 3.2 I've encountered a problem with answer 7.  It states that AB does not imply that A time B equals 0 (AB = 0).  The problem is with the example they give, they use two 2x2 matrices to demonstrate AB = 0 where neither A or B is a zero matrix.  They use:[1 2]  [-2  4]  =  [0 0][3 6]  [ 1 -2]  =  [0 0]Link to AnswersEither I've learned something wrong or don't know my basic math skills but to me I can't get the multiplication of those two to work.  If anyone can help I'd appreciate it.   
Quote:Original post by programmermattc[...] It states that AB does not imply that A time B equals 0 (AB = 0).That didn't make any sense. It probably states that AB=0 does not imply that either A=0 or B=0.Quote:The problem is with the example they give, they use two 2x2 matrices to demonstrate AB = 0 where neither A or B is a zero matrix.  They use:[1 2]  [-2  4]  =  [0 0][3 6]  [ 1 -2]  =  [0 0]That's correct. [a b] [x y] = [ (ax+bz) (ay+bt) ][c d] [z t] = [ (cx+dz) (cy+dt) ]So [1 2]  [-2  4]  =  [ (1*(-2)+2*1) (1*4+2*(-2)) ] = [0 0][3 6]  [ 1 -2]  =  [ (3*(-2)+6*1) (3*4+6*(-2)) ] = [0 0]Can you post how you are doing the computations?Oh, and an easier example is[0 0] [0 0] = [0 0][1 0] [1 0] = [0 0];  Hello,  Well...maybe the link below will help.Math World  I'm not gonna do your coding for you as well as all you'd have to do is google matrix multiplication C++ and you'd probably get some code examples.  Hope this helps   ;[1 2] [-2  4]   [ (1 * -2 + 2 * 1) (1 * 4 + 2 * -2) ][3 6] [ 1 -2] = [ (3 * -2 + 6 * 1) (3 * 4 + 6 * -2) ] [ (-2 + 2) ( 4 -  4) ]    = [ (-6 + 6) (12 - 12) ] [ 0 0 ]    = [ 0 0 ];  Lol don't worry, I'm not directly applying this to code yet.  My error was in that I was only multiplying the numbers without the second column and not adding.Example:[1 2] [2 2] = [1*2][3 4] [2 2] = [2*2]  = [3*2]Etc...  Stupid mistake, thanks for the help though!   ;  Just incase you're interested... the set of arbitrary matrices is a good example of a ring structure that is not a domain. If, for instance, you take two integers x and y where x*y = 0 then you know immediately that one of x or y is equal to zero. Such a statement is not true of matrices, though it is true if you are speaking only in terms of invertible matrices.   ;Quote:Original post by BBHudsonJust incase you're interested... the set of arbitrary matrices is a good example of a ring structure that is not a domain. If, for instance, you take two integers x and y where x*y = 0 then you know immediately that one of x or y is equal to zero. Such a statement is not true of matrices, though it is true if you are speaking only in terms of invertible matrices.You forgot to tell the OP to consider the consequences of there not being a choice function for an arbitray family of non empty sets...we are no longer guranteed that our module over some field will have a free basis, o teh noes linear algebra is doomed! (as is always the case there is a workaround though).This is good and all, I mean I see where you are coming from. And I too feel that some modern developments in mathematics should definately be introduced when teaching matrices so it doesnt seem like matrices where pulled out of some donkey rear end but dont you think there is a more natural ordering to do this? What are the chances the OP knows set theory and group theory or ring thoery's application to Abastract Algebra? What I mean is that this post is kinda like the elephant in a collection of apples  :).   ;  I agree with Daerax's last post.And important observation to make when someone is learning about matrix multiplication is the interpretation of a matrix as representing a linear mapping. For instance, the mapping that sends (x,y) to (2*x+y,3*y,2*x-y) is represented by the matrix(2  1)(0  3)(2 -1)because one can compute the result of the mapping by computing the product(2  1)(0  3) (x)(2 -1) (y)Now matrix multiplication becomes a natural operation, since it corresponds to composition of linear mappings.That's a lot more basic, more obvious and more useful than pointing out that squared matrices represent an interesting example of ring a where the (0) ideal is not prime and it even exhibits nilpotent elements. :);Quote:Original post by DaeraxQuote:Original post by BBHudsonJust incase you're interested... the set of arbitrary matrices is a good example of a ring structure that is not a domain. If, for instance, you take two integers x and y where x*y = 0 then you know immediately that one of x or y is equal to zero. Such a statement is not true of matrices, though it is true if you are speaking only in terms of invertible matrices.You forgot to tell the OP to consider the consequences of there not being a choice function for an arbitray family of non empty sets...we are no longer guranteed that our module over some field will have a free basis, o teh noes linear algebra is doomed! (as is always the case there is a workaround though).This is good and all, I mean I see where you are coming from. And I too feel that some modern developments in mathematics should definately be introduced when teaching matrices so it doesnt seem like matrices where pulled out of some donkey rear end but dont you think there is a more natural ordering to do this? What are the chances the OP knows set theory and group theory or ring thoery's application to Abastract Algebra? What I mean is that this post is kinda like the elephant in a collection of apples  :).Ok so it was a little irrelavant, but I did say "just incase you're interested" :p. I feel it natural to teach abstract algebra along side linear algebra; it helps to understand why you're learning what you're learning. This particular example - zero divisors in matrices - seems more important to the big picture when you see it in terms of rings. As for set theory, I think we all know that in an ideal world that would be the first thing anybody is taught ;)   ;Quote:Original post by programmermattcIn part 3.2 I've encountered a problem with answer 7.  It states that AB does not imply that A time B equals 0 (AB = 0).  programmermattc, in math with real number or integers, when xy = 0 then we know that either x = 0 or y = 0. One of the x or y must be 0. But with matrices AB = 0, neither A nor B have to be 0. We can have AB = 0 with nonzero matrices as the example shows. AB = 0 does not imply A = 0 or B = 0. With real or integer numbers we know that xy = 0 implies x = 0 or y = 0 but with matrices this is false! -----Also, in math the word imply means something specific than its everyday usage, you cant use the math imply with everyday reasoning because otherwise nonsense would occur. They should only be used with math objects.A way to read imply is in terms of if then and also to consider if the condition after the imply is necessary for the condition before.  Consider:for some real number x, x < 1 implies x < 0.Is it true that if x < 1 then it is less than zero? Is it necessary for x to be less than zero for it to be less than 1? Certainly not since we have that for x = 0.4, x < 1 but is still greater than zero. But is the converse, the opposite true? If x < 0 then x < 1, is this true?x < 0 implies x < 1.This is true because a number must certainly necessarily be less than one if it is to be less than zero.Now suppose we were to restrict ourselves a bit:For some integer x not equal to zero, x < 1 implies x < 0. Is this true? If x <> 0 and x < 1 then is x < 0? Is it necessary for some nonzero integer be less than zero if it is to be less than 1? If you say yes then you are correct. Explain to yourself why this is and also consider the case when x may be equal to zero. This is to show that it is important to be specific to the number system you speak of, we could say what we did because we can order the reals and integers in a way that we can do algebra with. But for some numbers like the complex numbers we can not order things in terms of < that behaves properly when trying to do algebra.   