Hi Avi, On 2015-07-12, avi kaur <kauravi...@gmail.com> wrote: > Hello > > I figured out that when we add a number to a matrix, It adds this > number to all the elements at diagonal of matrix. for example:
That's the expected behaviour. If R is a commutative ring and M is the ring of all nxn matrices over R, then we can identify R with the sub-ring of M given by all diagonal matrices. In other words: Let A be an integer nxn-matrix A, let b be an integer, and let B be the nxn matrix that has b on the diagonal and zero off-diagonal. The component-wise scalar multiplication A*b has the same result as the matrix product A*B. And the algebraically most consequent interpretation of A+b is /not/ component-wise, but is A+b=A+B. Best regards, Simon -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.