Row-wise and Column-wise Scalar Multiplication of Matrix📂Matrix Algebra
Row-wise and Column-wise Scalar Multiplication of Matrix
Theorem
Given a diagonal matrixD:=diag(d1,⋯,dn) and a matrixD:=diag(d1,⋯,dn), the following holds.
DA=AD=d1a11d2a21⋮dnan1d1a12d2a22⋮dnan2⋯⋯⋱⋯d1a1nd2a2n⋮dnannd1a11d1a21⋮d1an1d2a12d2a22⋮d2an2⋯⋯⋱⋯dna1ndna2n⋮dnann
In other words, multiplying the diagonal matrixD on the left results in scalar multiplication by row, while multiplying it on the right results in scalar multiplication by column.
Explanation
Let the i-th column vector of A be denoted by ai.
A=∣a1∣∣a2∣⋯∣an∣=[a1a2⋯an]
Then the formula above can be written as
AD=[d1a1d2a2⋯dnan]
Proof
This type of proof is generally poisonous to do. Let’s just visually check it for a 3th order matrix.