**Problem Statement:**
Given the required input arguments, write an efficient algorithm to solve the **Search a 2D Matrix** problem. Implement the required logic as specified by standard definitions for this classic algorithmic challenge.
**Hint / Expected Approach:**
Treat matrix as flat sorted array, index mapping
**Edge Cases to Consider:**
- (1) Target outside range
- (2) 1×1 matrix
- (3) Target at edges