I need to prove that if i multiply 2 diagonal matrixes i get a diagonal matrix. I understand the logic behind it but find it difficult to prove on paper.  I started with saying that a diagonal matrix Aij = 0 when i != j. Then I declared 2 diagonal matrixes A,B of size n*n.         n           i - 1           n   (AB)ij = Σ (Aik * Bkj) = Σ (Aik * Bkj) + Σ (Aik * Bkj)       k = 1         k = 1         k=j+1   so the first part equals zero because Aik will be 0 becasuse k is bigger than i. im stuck on the second part, how to show that the second part is also equal to 0, meaning what ranges to use on the sums.   thanks
Let $A [a_{i,j}]$  and $B =[b_{ij}]$   be two diagonal matrices in   $M_n(F)$. Let $i \ne j \in \left\{1, \ldots, n \right\}$. Using the   product rule, we obtain      $$(AB)_{ij} = \sum_{k=1}^{n} a_{ik}b_{kj}$$      We claim that $a_{ik}b_{kj} =0$ for all $k \in \left\{1, \ldots, n \right\}$ thus $(AB)_{ij}=0$ for all $i \ne j$ and $AB$ is diagonal. To    prove the claim, note that since $i \ne j$ , we have $i \ne k$ or $    k\ne j$. Thus either $a_{ik} = 0$ (since $A$ is diagonal) or $b_{kj} =  0$ (since $B$ is diagonal), thus in all cases $a_{ik}b_{kj}=0$ and the   claim is proved.   Where does the bit "we have $i \ne k$ or $k\ne j$" come from? I understand that since $i \ne j$, and $k$ and $j$ run over the same set of natural numbers, we also have $i \ne k$. But the "or $k \ne j$" baffles me. I understand that $k \ne j$ implies that we can have $i=k$. But that's from the other direction ($\Longleftarrow).$  Also, when it says $a_{ik}=0$ or $b_{kj}=0$ it's talking about when $i \ne k$ or $k \ne j$ right? Many thanks.
scope resolution operator without a scope Reverse / invert a dictionary mapping I have seen people showing one slide progressively by pressing Enter. Could anyone tell me how to realize that in Beamer? When to use icons vs. icons with text vs. just text links? Is there a rule forbidding the use of “is” at the end of a sentence? Is there any justification for using “is” at the end of an English sentence, or is there a rule that forbids this? Android : Is there any alternative to listFile function (Android java.io.File.listFiles()) Adding CSS Reference on Site Page In MK (Morse-Kelley) set theory life is easy: $\forall X\forall y\left(y\in\bigcap X\leftrightarrow\forall x\left(x\in X\rightarrow y\in x\right)\right)$. If $X=\left\{\right\}$ then $\bigcap X=U$, where $U$ is the universal class. So the (unary) intersection of the empty set is the class that contains all sets as elements. In ZF (Zermelo-Fraenkel) set theory, instead, proper classes are not allowed. So, how can I define $\bigcap X$ in ZF? I tried with the following definitions:   $\forall X\left(X\not=\left\{\right\}\rightarrow\forall y\left(y\in\bigcap X\leftrightarrow\forall x\left(x\in X\rightarrow y\in x\right)\right)\right)$. This means that $\bigcap\left\{\right\}$ is undefined, which is not that good. $\forall X\forall y\left(y\in\bigcap X\leftrightarrow X\not=\left\{\right\}\land\forall x\left(x\in X\rightarrow y\in x\right)\right)$. This means that $\bigcap\left\{\right\}=\left\{\right\}$, which is the opposite of MK.   I couldn't find any other valuable definition. Any ideas? Thank you. rewrite access to collection to avoid "double" finding Distribution of number of Bernoulli trials to a given number of successes I know the correct pronunciation (I think) of the words "ask" and "asked", but I quite often hear them pronounced as "ahks" and "ahksed" (almost like an "r" sound). I've heard it both in conversation and on television shows (both Australian and American).   Are these pronunciations due to dialect, or are they alternative pronunciations or incorrect pronunciations? If they are the correct pronunciation, should I use them or the "normal" pronunciation? Why does Oracle 9i treat an empty string as NULL? I know that it does consider ' ' as NULL, but that doesn't do much to tell me why this is the case.  As I understand the SQL specifications, ' ' is not the same as NULL -- one is a valid datum, and the other is indicating the absence of that same information.  Feel free to speculate, but please indicate if that's the case.  If there's anyone from Oracle who can comment on it, that'd be fantastic! Schengen area 90 days limit: Can I leave on the 91st day? Are punches with Gauntlets of Ogre Strength magical, improvised weapon attacks? My Gnoll Paladin just got the Gauntlets of Ogre Strength from Phandelver the other day, and it got me wondering:    Would it be possible/make sense for punches using them to count as an improvised weapon? (Since I'm not punching with empty fists, I'm wearing magical gauntlets) If so, would punches from a person using them count as magical weapon damage? Image of concave mirror when object is farther than the focal point I have a set of concave/convex mirrors/lenses, and I have drawn out all of the ray tracing diagrams for each possible combination and type of image each optical element can produce. When I look at the ray tracing diagrams then reproduce the situation in the real world with myself as the &quot;object&quot;, all the scenarios make sense to me except one: when I as the object stand beyond the focal point of a concave mirror.  The image ends up as &quot;real&quot; and appears to be in front of the mirror. Now I understand that in the situation above, I as the object would stand at 6m and this would result in the image appearing at 12m. So if I placed a wall or screen at the 12m mark, the image would form on that surface (just like a movie theater screen).... at least I think I interpreted that correctly. But I still see myself when I look in the mirror?! If the image is supposed to form and come into focus behind me, what in the world am I seeing when looking at the surface of the mirror? I still see myself, just inverted. The surface of the concave mirror still has a reflection on it. It doesn't look quite like a normal flat mirror, in that the image doesn't really look like it's &quot;inside&quot; the mirror, more like it's right on the surface of it. It's really frustrating because every other possible arrangement of optical elements makes total sense to me, except this one. Any suggestions on how to think about it? Thank you for your time! find all the members of A4/K Let K={(1),(12)(34),(13)(24),(14)(23)} show that K is a normal subgroup of the alternating group of degree A4 and find all the members of A4/K and write down the group table for A4/K.   i know that K is the Klein four group and i have already proven it is a normal subgroup but i need a start on approaching the A4/K part of this question no direct answers are necessary,just ideas thank you! :) How to duplicate sys.stdout to a log file? Edit: Since it appears that there's either no solution, or I'm doing something so non-standard that nobody knows - I'll revise my question to also ask: What is the best way to accomplish logging when a python app is making a lot of system calls?  My app has two modes.  In interactive mode, I want all output to go to the screen as well as to a log file, including output from any system calls.  In daemon mode, all output goes to the log.  Daemon mode works great using os.dup2().  I can't find a way to "tee" all output to a log in interactive mode, without modifying each and every system call.    In other words, I want the functionality of the command line 'tee' for any output generated by a python app, including system call output.  To clarify:   To redirect all output I do something like this, and it works great:  # open our log file so = se = open("%s.log" % self.name, 'w', 0)  # re-open stdout without buffering sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)  # redirect stdout and stderr to the log file opened above os.dup2(so.fileno(), sys.stdout.fileno()) os.dup2(se.fileno(), sys.stderr.fileno())   The nice thing about this is that it requires no special print calls from the rest of the code.  The code also runs some shell commands, so it's nice not having to deal with each of their output individually as well.  Simply, I want to do the same, except duplicating instead of redirecting.  At first thought, I thought that simply reversing the dup2's should work.  Why doesn't it?  Here's my test:   import os, sys  ### my broken solution: so = se = open("a.log", 'w', 0) sys.stdout = os.fdopen(sys.stdout.fileno(), 'w', 0)  os.dup2(sys.stdout.fileno(), so.fileno()) os.dup2(sys.stderr.fileno(), se.fileno()) ###  print("foo bar")  os.spawnve("P_WAIT", "/bin/ls", ["/bin/ls"], {}) os.execve("/bin/ls", ["/bin/ls"], os.environ)   The file "a.log" should be identical to what was displayed on the screen. Can Mjolnir "stick" to anything? How to visualize Reverse Triangle Inequality $||\mathbf{a}| − |\mathbf{b}|| ≤ |\mathbf{a} − \mathbf{b}|$? pp  and ,   illustrates Triangle Inequality. But without referring to Triangle Inequality at all, how to picture  Reverse Triangle Inequality for all $\mathbf{a,b} \in C^n$? I don't want proofs or rigour. How to get back Windows 10 [UEFI] after Legacy installation of Fedora 24?