Bounds check for A matrix