title: 2D Math Matrix with Malloc
body: <p>I know a similar question is already asked here for example:</p>
  <p><a href="https://stackoverflow.com/questions/36890624/malloc-a-2d-array-in-c">Malloc a 2D array in C</a></p>
  <p>However, my question is not how to create one but rather if I should prefer to use for a mathematical 2D matrix a &quot;real&quot; 2D array (with pointers of pointers) or rather a flattened 1-dimensional array with proper indexing.</p>