Assignment #5
Why solve(A) and det(A) work A is a square matrix (10×10), hence det(A) is defined and equals 0, which means that A is unique (not invertible). det(A) = 0, solve(A) properly gives a solitary system error (there is no inverse). Why operations on B fail (non‑square matrix). B is not a square (10×100). Inverse and determinants are only defined for square matrices, therefore both calls are wrong by definition. A determinant close to 0 means (almost) singularity and computations that aren't stable. It's better to use solution(A, b) (or qr.solve/SVD) to solve systems than to make an explicit inverse; it's more reliable and quicker. https://github.com/shanzay28/r-programming-assignments/edit/main/Doing%20Math%20in%20R%20-%20Part%201%20-README.md