Added test class for matrix A verification
Enhanced bounds checking in linear algebra
Simplified Row class