Is there any significant meaning of the gradient of a matrix?

6k Views Asked by At

Is there any significant meaning of the gradient of a matrix? What does it imply? For example in Matlab:

F = [ 2 4 5; 5 6 9; 0 1 3];
[Fx, Fy] = gradient(F);

Fx =

2.0000    1.5000    1.0000
1.0000    2.0000    3.0000
1.0000    1.5000    2.0000

Fy =

3.0000    2.0000    4.0000
-1.0000   -1.5000   -1.0000
-5.0000   -5.0000   -6.0000

How about the quiver(Fx, Fy) as shown below attached image? quiver(Fx, Fy)

1

There are 1 best solutions below

1
On BEST ANSWER

The definition provided by Matlab is clear enough: the command computes numerical derivatives (i.e., finite differences) in the horizontal and vertical directions. This is what you use if $F$ represents the values of some function sampled along a rectangular grid, and you want an approximation to the derivatives of $F$. The plot shows the directions in which the function grows the fastest (steepest ascent).

In the specific example of $F$ being greyscale intensity, the derivatives will measure how much the intensity changes between adjacent points. Large values of derivative may indicate an edge in the image; thus, truncating $|Fx|+|Fy|$ at some large value may serve as a primitive edge-detection algorithm. Of course, the real edge-detection algorithms are more sophisticated and look at more than just the difference of adjacent values.

By the way, I want to emphasize the difference between matrix-in-mathematics and matrix-in-matlab. Matrix-in-mathematics is something that represents a linear transformation. Matrix-in-matlab is any rectangular array filled with numbers, e.g., the result of evaluation of a function along a grid. The latter does not naturally represent any linear transformation; we are unlikely to ask what the rank, range and kernel are for this thing. Gradient makes sense for some matrices-in-matlab, but not for those that are matrices-in-mathematics.