Notation - max of row or column in a matrix

331 Views Asked by At

Given:

$$ s_i = \frac{1}{b-1} \max_j|e_{ij}| $$

For an embedding matrix $e$:

$$\begin{bmatrix} .05989021 & .14176647 & -.02797035 \\ -.00029387 & -.0053179 & .1040258 \\ -.00974955 & -.07137527 & -.02095303 \end{bmatrix}$$

let b = 128

I've calculated the scaling factors:

$$\begin{aligned} s_1&=\frac{1}{127}|(\max(.05989021,.14176647,-.02797035))|=.001116 \\ s_2&=\frac{1}{127}|(\max(-.00029387,-.0053179,.1040258))|=.000819 \\ s_3&=\frac{1}{127}|(\max(-.00974955,-.07137527,-.02095303))|=0.000562 \end{aligned}$$

I've realized I'm unsure why I take the max of each row and may have made a mistake. Does $ s_i = \frac{1}{b-1} max_j|e_{ij}| $ instruct to take the max of each column as $e_{ij}$ represents the row $i$ and the column $j$ ?

So, should the scaling factors should be calculated as :

$$\begin{aligned} s_1&=\frac{1}{127}|(\max(.05989021,-.00029387,-.00974955))| \\ s_2&=\frac{1}{127}|(\max(.14176647,-.0053179,.1040258))| \\ s_3&=\frac{1}{127}|(\max(-.02797035,.1040258,-.02095303))| \end{aligned}$$

1

There are 1 best solutions below

2
On

The first one is correct, you take the max over row.

You are correct that in $e_{ij}$ $i$ refers to row and $j$ to column.

In the expression $\max_j |e_{ij}|$ the index $i$ is fixed while $j$ runs. Combining this with the roles of $i$ and $j$ in the previous line we see: row is fixed and column runs so we take the max over all three (length 1) 'columns' appearing in the fixed row $i$.

About notation: $\max_j |e_{ij}|$ means the same as $\max (\{|e_{ij}| \colon j = 1, 2, 3\})$ and hence as $\max(\{|e_{i, 1}|, |e_{i, 2}|, |e_{i, 3}| \})$.

It is a bit easier to understand in situations where there is only one index:

$max_{n \in \mathbb{N}} (n(5 - n))$ is the same as $\max(\{n(5-n) \colon n \in \mathbb{N}\})$ so $\max(\{0, 4, 6, 6, 4, 0, -6, -14, \ldots \}) = 6$.