Multiplying matrix by row of zeros results in zeros in column

39 Views Asked by At

If I have a matrix $A$ which is $n\times n$ and I have another matrix $I$ which is almost the identity matrix but has some zeros in it’s diagonal entries, then the rows of zeros in $I$ make the columns of $A$ zeros.

For a concrete example see these two WA links: Link 1 Link 2

Why is this true (proof perhaps)? I'm not really sure how to word my Question since I don't really now what is happening.

2

There are 2 best solutions below

0
On BEST ANSWER

Since $I$ is usually used to denote identity, let me use another letter like $J$.

$J$ is a diagonal matrix with binary diagonal entries. Let $S=\{ i_1, \ldots, i_m\}$ be indices where $J_{i_k,i_k}=1$

We can write $$J= \sum_{k=1}^me_{i_k}e_{i_k}^T$$

where $e_i$ is the $i$-th standard unit basis. Notice that we have $Ae_i = A_i$ where $A_i$ is the $i$-th column of $A$.

Hence $$AJA^T=\sum_{k=1}^m Ae_{i_k}e_{i_k}^TA^T=\sum_{k=1}^mA_{i_k}A_{i_k}^T$$

and columns that does not corresponds to $S$ will be have no effect on the sum.

0
On

When you multiply matrices $A$ and $B$, the $i$th column of the product is $A$ times the $i$th column vector of $B$.

If that column is a “standard basis vector” $\vec{e}_j$, that is, a vector with all zeros except for one $1$ in the $j$th position, the result is the $j$th column of $A$.

This means that if $B$ is a diagonal matrix, $AB$ is the same as $A$ after scaling each column by diagonal entry in the corresponding column of $B$: $$ \begin{bmatrix} \vec{a}_1 & \vec{a}_2 & \cdots & \vec{a}_n\end{bmatrix} \begin{bmatrix} \lambda _1 \\ & \lambda _2 \\ && \ddots \\ &&&\lambda_n \end{bmatrix} =\begin{bmatrix} \lambda_1\vec{a}_1 & \lambda_2\vec{a}_2 & \cdots & \lambda_n\vec{a}_n\end{bmatrix} $$ So if one of those $\lambda_i$'s is zero, the product $\lambda_i\vec{a}_i$ is the zero vector.