I have a equation such as
A=[1 2 3; 4 5 6];
J=ones(size(A));
B=max(A(:))*.J-A;
In which $J$ is matrix of ones with its size equal A's size.The above equation show how to compute $B$ from given matrix $A$. It will be find a maximum value of matrix $A$ then multiple it with a matrix one and perform the subtraction with A matrix.
I am looking for a way to represent the relationship between matrix $A$ and $B$ in mathematics. Could you suggest to me a common definition for above equation $(B=max(A(:))*.J-A)$?
The question is: given $A$ an $m \times n$ matrix whose $i, j$th component is $a_{ij}$, let $$\mu = \max \{ a_{ij} : 1 \leq i \leq m, 1 \leq j \leq n\}$$
Let $J_{m \times n}$ be the $m \times n$ matrix whose $i, j$th component is $1$: that is, the all-ones matrix. (This notation isn't quite standard, but it's as close to standard as I know. $J$ is often the all-ones matrix, but you should always define it before using it.)
Then the Matlab code is finding $$\mu J_{m \times n} - A$$