Classify a region by its slope Definitions

The kth ring of a square matrix of size N, where 1 ≤ k ≤ ceiling(N/2) is the list formed by the elements of the kth and (N-k+1)th rows and columns, but without the first and last k-1 elements.

Example:


Matrix:

1 2 3 4 5
6 7 8 9 1
8 7 6 5 4
3 2 1 9 8
7 6 5 4 3

Delimited in rings:

+-------------------+
| 1   2   3   4   5 |
|   +-----------+   |
| 6 | 7   8   9 | 1 |
|   |   +---+   |   |
| 8 | 7 | 6 | 5 | 4 |
|   |   +---+   |   |
| 3 | 2   1   9 | 8 |
|   +-----------+   |
| 7   6   5   4   3 |
+-------------------+


The first ring of the above is 1,2,3,4,5,1,4,8,3,4,5,6,7,3,8,6, the second is 7,8,9,5,9,1,2,7 and the third is 6.

An N by N matrix of positive integers is (for the purposes of this challenge):


concave if all the integers on the kth ring are strictly greater than those on the (k+1)th ring, where k is any integer between 1 and N  (those on the first ring are greater than those on the second, which are in turn greater than those on the third etc.). Example:


4 5 6 4 7   -> because 4,5,6,4,7,4,8,5,5,4,6,5,9,5,5,4 are all higher than
4 3 2 2 4      any of 3,2,2,3,2,3,3,2, which are all higher than 1
5 2 1 3 8
5 3 3 2 5
9 5 6 4 5

flat if all the integers in the matrix are equal. Another example (perhaps redundant):


2 2 2 2
2 2 2 2
2 2 2 2
2 2 2 2

convex if all the integers on the kth ring are strictly lower than those on the (k+1)th ring, where k is any integer between 1 and N  (those on the first ring are lower than those on the second, which are in turn lower than those on the third etc.). Example:


1 2 1   -> because 1 and 2 are both lower than 6
2 6 2
1 2 1

mixed if the matrix doesn't satisfy any of the above criteria. Example:


3 3 3 3 3
3 2 2 2 3
3 2 3 2 3
3 2 2 2 3
3 3 3 3 3



Challenge

Given a square matrix of positive integers of size at least 3, classify it according to the definitions above. That is, output one of four different consistent values based on whether the matrix is concave, flat, convex or mixed.

You can compete in any programming language and can take input and provide output through any standard method and in any reasonable format, while taking note that these loopholes are forbidden by default. This is code-golf, so the shortest submission (in bytes) for every language wins.

Test cases

Here's a bunch of examples for you to choose from – I selected 6 from each category.

Concave

[[3, 3, 3], [3, 1, 3], [3, 3, 3]]
[[2, 3, 4], [5, 1, 6], [7, 8, 9]]
[[19, 34, 45], [34, 12, 14], [13, 13, 13]]
[[3, 4, 3, 4], [4, 2, 1, 3], [3, 1, 2, 4], [4, 3, 4, 3]]
[[4, 5, 6, 4, 7], [4, 3, 2, 2, 4], [5, 2, 1, 3, 8], [5, 3, 3, 2, 5], [9, 5, 6, 4, 5]]
[[7, 7, 7, 7, 7], [7, 6, 6, 6, 7], [7, 6, 5, 6, 7], [7, 6, 6, 6, 7], [7, 7, 7, 7, 7]]


Flat

[[1, 1, 1], [1, 1, 1], [1, 1, 1]]
[[2, 2, 2], [2, 2, 2], [2, 2, 2]]
[[8, 8, 8], [8, 8, 8], [8, 8, 8]]
[[120, 120, 120], [120, 120, 120], [120, 120, 120]]
[[10, 10, 10, 10], [10, 10, 10, 10], [10, 10, 10, 10], [10, 10, 10, 10]]
[[5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5], [5, 5, 5, 5, 5, 5]]


Convex

[[1, 2, 1], [2, 6, 2], [1, 2, 1]]
[[1, 1, 1], [1, 2, 1], [1, 1, 1]]
[[19, 34, 45], [34, 76, 14], [13, 6, 13]]
[[3, 3, 3, 3], [3, 4, 4, 3], [3, 4, 4, 3], [3, 3, 3, 3]]
[[192, 19, 8, 6], [48, 324, 434, 29], [56, 292, 334, 8], [3, 4, 23, 23]]
[[291, 48, 7, 5], [47, 324, 454, 30], [58, 292, 374, 4], [9, 2, 53, 291]]


Mixed

[[1, 2, 3], [4, 5, 9], [6, 7, 8]]
[[10, 14, 21], [100, 8, 3], [29, 2, 19]]
[[5, 5, 5, 5], [5, 4, 4, 5], [5, 4, 6, 5], [5, 5, 5, 5]]
[[3, 3, 3, 3], [3, 1, 2, 3], [3, 3, 2, 3], [3, 3, 3, 3]]
[[12, 14, 15, 16], [12, 18, 18, 16], [12, 11, 11, 16], [12, 14, 15, 16]]
[[5, 5, 5, 5, 5], [5, 4, 4, 4, 5], [5, 4, 6, 4, 5], [5, 4, 4, 4, 5], [5, 5, 5, 5, 5]]
Jelly,  18 17  16 bytes
I believe there is a lot of potential for this effort to be out-golfed
L‘HạŒỤṀ€IṠQṢ«FE$

A monadic link accepting a list of lists of numbers which returns a list of integers:
Concave -&gt;  [0, 0]
Flat    -&gt;  [-1, 0, 1]
Convex  -&gt;  [-1, 0]
Mixed   -&gt;  [-1, 0, 0]

Try it online! Or see the test-suite.
L‘H could be replaced with the less efficient but atomically shorter JÆm.
How?
L‘HạŒỤṀ€IṠQṢ«FE$ - Link: list of (equal length) lists of numbers
L                - length
 ‘               - increment
  H              - halve
                 -   = middle 1-based index (in both dimensions as the input is square)
    ŒỤ           - sort multi-dimensional indices by their corresponding values
                 -   = a list of pairs of 1-based indexes
   ạ             - absolute difference (vectorises)
                 -   = list of [verticalDistanceToMiddle, horizontalDistanceToMiddle] pairs
      Ṁ€         - maximum of €ach
                 -   each = N/2-k (i.e. 0 as middle ring and N/2 as outermost)
        I        - incremental deltas (e.g. [3,2,2,3,1]-&gt;[3-2,2-2,3-2,1-3]=[-1,0,1,-2])
         Ṡ       - sign (mapping -n:-1; 0:0; and +n:1)
          Q      - de-duplicate
           Ṣ     - sort
                 -   = concave:[0, 1]; convex:[-1, 0]; flatOrMixed:[-1, 0, 1]
               $ - last two links as a monad
             F   -   flatten
              E  -   all equal? (1 if flat otherwise 0)
            «    - minimum (vectorises)
                 -   = concave:[0, 0]; convex:[-1, 0]; mixed:[-1, 0, 0]; flat:[-1, 0, 1]