C++ (Easy to understand commented approach)
\n/*\n\tIf number of -ve numbers are even, it means you can ALWAYS shift -1 in a\n\tfashion that you can cancel out the negative signs and make the numbers posi
```\n/*\n\tIf number of -ve numbers are even, it means you can ALWAYS shift -1 in a\n\tfashion that you can cancel out the negative signs and make the numbers positive.\n\tSo in that case, total sum (absolute value of all elements) will be your answer\n\t\n\tIf number of -ve numbers are odd, then you can cancel out the negative sign \n\tof large numbers so that they contribute to our over all sum.\n\tAnd notice that at the end, you will be left with one negative number.\n\tSo, shift this negative sign to the smallest number\n*/\n```\n\n```\nclass Solution {\npublic:\n    long long maxMatrixSum(vector<vector<int>>& matrix) {\n        int m = matrix.size();\n        int n = matrix[0].size();\n        \n        long long sum = 0;\n        int negCount = 0;\n        int smallestMin = INT_MAX;\n        \n        for(int i = 0; i<m; i++) {\n            for(int j = 0; j<n; j++) {\n                sum += abs(matrix[i][j]); //Add all the numbers\n                \n                if(matrix[i][j] < 0)\n                    negCount++; //keep track of count of -ve numbers\n                \n\t\t\t\t//keep track of the smallest number which can be negative\n                smallestMin = min(smallestMin, abs(matrix[i][j]));\n            }\n        }\n        \n        return negCount%2 == 0 ? sum : sum-2*smallestMin;\n\t\t/*\t\t\n\t\t\tWhy (sum-2*smallestMin) ????\n\t\t\t\tIn simple words : You had first added that number, \n\t\t\t\tso you need to subtract that addition and also in the\n\t\t\t\tend, you need to reduce the sum with that number.\n\t\t\t\tThat\'s why we have to substract 2 times.\n\t\t\t\tSee with the example below :\n\t\t\t\t[1,   2, 3]\n\t\t\t\t[-1, -2,-3]\n\t\t\t\t[1,   2, 3]\n\t\t\t\n\t\t\t\n\t\t\t\tOver all Sum "S"(all elements with abs value) = 18\n\t\t\t\tNegative count = 3 which is odd\n\t\t\t\tSmallest number which can be negative is "Min"= 1\n\n\t\t\t\tso, \n\t\t\t\t[1,   2, 3]\n\t\t\t\t[-1,  2, 3]\n\t\t\t\t[1,   2, 3]\n\n\t\t\t\tNow, final sum "F" = 1 + 2 + 3 + (-1) + 2 + 3 + 1 + 2 + 3 = 16\n\n\t\t\t\tSo, final result "F" = "S" - 2*Min  (i.e. 18 - 2*1) = 16\n\t\t*/\n    }\n};\n```
[]