logo

Row-wise and Column-wise Scalar Multiplication of Matrix 📂Matrix Algebra

Row-wise and Column-wise Scalar Multiplication of Matrix

Theorem

Given a diagonal matrix $D := \text{diag} \left( d_{1} , \cdots , d_{n} \right)$ and a matrix $D := \text{diag} \left( d_{1} , \cdots , d_{n} \right)$, the following holds. $$ \begin{align*} D A =& \begin{bmatrix} d_{1} a_{11} & d_{1} a_{12} & \cdots & d_{1} a_{1n} \\ d_{2} a_{21} & d_{2} a_{22} & \cdots & d_{2} a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ d_{n} a_{n1} & d_{n} a_{n2} & \cdots & d_{n} a_{nn} \end{bmatrix} \\ A D =& \begin{bmatrix} d_{1} a_{11} & d_{2} a_{12} & \cdots & d_{n} a_{1n} \\ d_{1} a_{21} & d_{2} a_{22} & \cdots & d_{n} a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ d_{1} a_{n1} & d_{2} a_{n2} & \cdots & d_{n} a_{nn} \end{bmatrix} \end{align*} $$ In other words, multiplying the diagonal matrix $D$ on the left results in scalar multiplication by row, while multiplying it on the right results in scalar multiplication by column.

Proof

This type of proof is generally poisonous to do. Let’s just visually check it for a $3$th order matrix.

$$ \begin{bmatrix} x & 0 & 0 \\ 0 & y & 0 \\ 0 & 0 & z \end{bmatrix} \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} = \begin{bmatrix} xa & xb & xc \\ yd & ye & yf \\ zg & zh & zi \end{bmatrix} $$