Why are the two outputs different:  The only difference in the 2 approaches is the way the matrix has been initialized. I expect to get the same output in both the scenarios but the output seems to be different?   Is there something I am missing?  x = 4 table = [[0]*(x)]*x for i in range(x):     table[i][i] = 1 print(table)   table: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]  x = 4 table = [[0]*x for i in range(x)] for i in range(x):     table[i][i] = 1 print(table)   table: [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]
410
I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?
16558
I can't find this case in the board, so I'm asking the question.  This is input file:  module   x(a,b,c)   module   y(d,e,f,   g,h,i)   module   z(j,k,l)   And output file should be:  module x(a,b,c)   module y(d,e,f,   g,h,i)   module z(j,k,l)
11601
I am looking for an intuitive explanation as to why/how row rank of a matrix = column rank. I've read the proof at  and I understand the proof, but I don't "get it". Can someone help me out with this ?   I find it hard to wrap my head around the idea of how the column space and the row space is related at a fundamental level.
12339
What is the difference between a[bc]d and a{b,c}d? Why do people use a{b,c}d when there is already a[bc]d?
106041
$$\begin{cases} &amp;x  &amp;- &amp;y &amp;+ &amp;2z &amp;= 4 \\ &amp;3x &amp;- &amp;2y &amp;+ &amp;9z &amp;= 14 \\ &amp;2x &amp;- &amp;4y &amp;+ &amp;az &amp;= b \end{cases} $$ I know that $a$ and $b$ has to either equal to something or not in order to satisfy the $4$ conditions stated above.   my matrices looked like $$         \begin{bmatrix}         1 &amp; -1 &amp; 2 \\         0 &amp; 1 &amp; 3 \\         0 &amp; 0 &amp; a+12 \\         \end{bmatrix} \begin{bmatrix}         x &amp; \\         y &amp;\\         z &amp;  \\         \end{bmatrix}= \begin{bmatrix}         6 &amp;  \\         2 &amp; \\         b+8 &amp; \\         \end{bmatrix} $$
28825
These seem to be very similar as they both separate two operands. When would one be used over the other? Is there any difference in the math spacing surrounding them?  How would the spacing in these relate to to the spacing produced by \mathop?
15584
In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?
120694
The book asks you to prove that $SL_n(\mathbb{R})$ is generated by elementary (row operation) matrices in which one nonzero off-diagonal entry is added to the identity matrix.  For example,   $$ \begin{bmatrix} 1 &amp; a \\ 0 &amp; 1 \end{bmatrix} $$  acts by left multiplication on $2\times2$ matrices by adding $a$ times (row 2) to (row 1).   Considering a simple example:  $$ M= \begin{bmatrix} a &amp; 0  \\  0 &amp; 1/a \end{bmatrix}, a \neq 0$$  you can see that the matrix $M$ does belong to $SL_n(\mathbb{R})$.  However, the elementary matrices composing $M$ are of the below type and not of the first type (nonzero off-diagonal entry).  $$ \begin{bmatrix}  c &amp; 0 \\   0 &amp; 1  \end{bmatrix} $$ i.e. one nonzero diagonal entry added to the identity matrix.  So  $$M =  \begin{bmatrix} a &amp; 0 \\ 0 &amp; 1 \end{bmatrix} \begin{bmatrix} 1 &amp; 0 \\ 0 &amp; 1/a \end{bmatrix} $$  So $M$ clearly isn't generated by the first type.  What is going wrong?
43877
I would appreciate if someone could tell me difference between [t] and [ht] in the following example? I don't see a difference in the output pdf file.  \begin{figure}[ht] ... \end{figure}   and  \begin{figure}[t] ... \end{figure}
32910
I should consider group tables obtained by renaming elements as essentially the same and then show that there are only two essentially different groups of order 4.  There seems to be so many different possible group tables for all the different binary operations - which is why I'm confused. I was thinking about using Cayley's table to show their commutativity but I'm really not too sure. Any help please!   Edit: After all of your help, I completely understand how to show that there are only two different groups of order four. Thank you. The only thing which I am still unclear of is how to note down the 'other tables' before stating that they are essentially the same as one of the other tables - meaning that there are just two different ones. It's pointless work but I think it's what the question requires.  Answer: After a bit of playing around - I've realised that there are four different tables, however, 3 tables are the same as each other, just with different values (the Klein 4 Group with 3 different generators). Hence there are two tables.
106415
Why do we use a permutation table in the first step of  and one at the end of the algorithm?
33748
What is the difference between int *a[3] and int (*a)[3]?
46866
Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about  for i in range(0, 20): for i in xrange(0, 20):
53005
$$\begin{bmatrix} 1235 &amp;2344 &amp;1234 &amp;1990\\ 2124 &amp; 4123&amp; 1990&amp; 3026 \\ 1230 &amp;1234 &amp;9095 &amp;1230\\ 1262 &amp;2312&amp; 2324 &amp;3907  \end{bmatrix}$$  Clearly, its determinant is not zero and, hence, the matrix is invertible.   Is there a more elegant way to do this?  Is there a pattern among these entries?
8035
So I'm complete stuck with something. I know it the following statements are true (or at least the seem to be from the results that I got from messing around with it a bit on MATLAB), but I don't understand why they are true or how to show so. Let $A$ be and $m$X$n$ matrix. Show that:  a) if $x \in N(A^TA)$ then $Ax$ is in both $R(A)$ and $N(A^T)$.   For this one I messed around with it with my own examples and I got $Ax=0$, therefore satisfing the statement, but I don't understand what's actually going on.   b) $N(A^TA)=N(A)$  again, makes sense when I see the results in MATLAB, but don't undestand why it works.  c) $A$ and $A^TA$ have the same rank  d) If $A$ has linearly independent columns, the $A^TA$ is nonsingular.  For the last two I have no idea on how to even start showing the relationship. I feel like I'm missing some crucial relationship between $A$ and $A^TA$, but I'm just not seeing it.   I would greatly appreciate any help of sugestions on how to show that these statements are true.   Thank you very much.
5798
Is there any meaningful distinction between:  class A(object):     foo = 5   # some default value   vs.  class B(object):     def __init__(self, foo=5):         self.foo = foo   If you're creating a lot of instances, is there any difference in performance or space requirements for the two styles? When you read the code, do you consider the meaning of the two styles to be significantly different?
109365
What do the leading variables and free variables in a matrix mean? I have the system below and am trying to understand which are which. I searched a lot for this, please help me ! $$w + x + y + z = 6 \qquad w + y + z = 4 \qquad w + y = 2$$