Sum the deltas of my matrix Background
The deltas of an array of integers is the array formed by getting the differences of consecutive elements. For example, [1, 2, 4, 7, 3, 9, 6] has the following deltas: [1, 2, 3, -4, 6, -3].
We will now define the deltas of a matrix of integers as the deltas of each row and each column it contains.
As an example:
Row deltas:

1 2 3 4 │ =&gt; [1, 1, 1]
4 5 6 7 │ =&gt; [1, 1, 1]
7 1 8 2 │ =&gt; [-6, 7, -6]

Column deltas (the matrix' columns have been rotated into rows for simplicity):

1 4 7 │ =&gt; [3, 3] 
2 5 1 │ =&gt; [3, -4]
3 6 8 │ =&gt; [3, 2]
4 7 2 │ =&gt; [3, -5]

Which gives us the following list of matrix deltas:
[[1, 1, 1], [1, 1, 1], [-6, 7, -6], [3, 3], [3, -4], [3, 2], [3, -5]]

And as we don't want them to be nested, we flatten that list:
[1, 1, 1, 1, 1, 1, -6, 7, -6, 3, 3, 3, -4, 3, 2, 3, -5]


Task
Your task is to sum all the deltas of a matrix given as input. Note that the matrix will only consist of non-negative integers.
Rules

All standard rules apply.

You may assume the matrix contains at least two values on each row and column, so the minimum  size will be 2x2.

You may take the matrix in any reasonable format, as long as you specify it.

You may not assume that the matrix is square.

If it might help you reduce your byte count, you may optionally take the number of rows and the number of columns as input as well (Looking at you C!).

This is code-golf, so the shortest code (in bytes), in each language wins!


Test Cases

Input  =>  Output

[[1, 2], [1, 2]]                                    => 2
[[8, 7, 1], [4, 1, 3], [5, 5, 5]]                   => -9
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]                   => 24
[[9, 9, 9, 9, 9], [9, 9, 9, 9, 9]]                  => 0
[[1, 3, 14], [56, 89, 20], [99, 99, 99]]            => 256
[[1, 2, 3, 4], [4, 5, 6, 7], [7, 1, 8, 2]]          => 9
[[13, 19, 478], [0, 12, 4], [45, 3, 6], [1, 2, 3]]  => -72
Python 2, 42 bytes



lambda m:sum(r[-1]-r[0]for r in m+zip(*m))


An unnamed function taking a list of lists, m, and returning the resulting number.

Try it online!

How?

The sum of the deltas of a list is the last element minus the first, everything else just cancels:
(r[n]-r[n-1])+(r[n-1]-r[n-2])+...+(r[2]-r[1]) = r[n]-r[1]

The zip(*m) uses unpacking (*) of m to pass the rows of m as separate arguments to zip (interleave) and hence transposes the matrix. In python 2 this yields a list (of tuples, but that's fine), so we can add  (concatenate) it to (with) m, step through all our rows and columns, r, perform the above trick for each and just add up the results (sum(...)).