Correctly compute first element for generic matrix.