0
$\begingroup$

I have an unknown matrix. I need to multiply it by a 2nd matrix. The result of this multiplication should be a binary matrix of values greater than threshold t as 1 and smaller as 0.

For example: Display all values greater than 100 as 1, and others as 0.

Unknown Matrix M1    Result R
|100|99 |100|        |0|0|0|
|13 |100|112|   ==>  |0|0|1|
|0  |150|2  |        |0|1|0|

What is M2 (the matrix that I will multiply M1 by) needs to be?

A broader example:

        Create Matrix for values larger than t
M1                    R
|t|            |0|0|1|
|t|  *  M2 =   |0|0|1|
|>t|

My question is my first step to figure out how to solve this issue: https://stackoverflow.com/questions/41517564/monochrome-filter-in-svg-ideally-snap-svg

  • 0
    Are you comfortable with row-reduction?2017-01-07
  • 0
    The particular context in which I need this question solved does not allow me to perform any actions on the matrix except multiplications.2017-01-07
  • 0
    Row operations can be expressed via matrix multiplication, if that changes anything2017-01-07
  • 0
    I'm open to hear what your thinking of. Maybe it will get my on the right path. Thanks!2017-01-07

1 Answers 1

0

It is impossible to express such an operation with a matrix multiplication:

let the threshold be 3, and $$ M_1= \begin{pmatrix} 4 & 2\\ 2 & 1 \end{pmatrix} $$ you want to obtain $$ M_1M_2= R = \begin{pmatrix} 1 & 0\\ 0 & 0 \end{pmatrix} $$ but if $v=(v_1,v_2)$ is the first column of $M_2$, then

(1° row, 1° column) $$ 4v_1 + 2v_2 = 0 $$ (2° row, 1° column) $$ 2v_1 + v_2 = 1 $$ that are incompatible.

  • 0
    Maybe I am failing to express my issue in a strictly mathematical way. Forgive me, I am not a mathematician, but this is what I am after: http://stackoverflow.com/questions/41517564/monochrome-filter-in-svg-ideally-snap-svg2017-01-07