I am trying to find an analytical method to find the number of valid elements in a matrix*matrix^T
from the matrix without the need of doing the multiplication. I call valid elements all elements which multiplication is not zero. I'll give a brief example: Say we have this matrix A
:
1 2 0 4 0 0 2 3 5
and its transposed T
:
1 4 2 2 0 3 0 0 5
Let's call Zij
= Number of elements valid of row i
of A
when multiply by column j
of T
. For instance, Z00 = N_valids(1*1+2*2+0*0) = 2
Z10 = N_valids(4*1+0*2+0*0) = 1
Following this we'll have Z
:
2 1 2 1 1 1 2 1 3
I would like to know if somebody knows how to find out Z
from A
. The diagonal elements its clear, but not the rest...