I have a question about image gradient magnitude, given an image $I$. The horizontal and vertical derivatives resulting from Sobel filters are defined as: $$K_x= \begin{bmatrix} -1 & 0 & 1 \\ -2 & 0 & 2 \\ -1 & 0 & 1 \\ \end{bmatrix}*I; K_y= \begin{bmatrix} -1 & -2 & -1 \\ 0 & 0 & 0 \\ 1 & 2 & 1 \\ \end{bmatrix}*I $$
where $*$ denotes the convolution operator. The gradient magnitudes can be computed as
$$I_{\delta}=\sqrt{(K_x^2+K_y^2)}$$.
Now, I want to "invert" the result of $I_{\delta}$, so that maximum magnitude gradient values become zero. Then the "inverting" function $g$ is $$g(I_{\delta})=\max (I_{\delta}) - I_{\delta}\,.$$
My question is: is $I_{\delta}$ scalar or vector? What do you think? If it is possible, could you correct help me.