Assignment #5: Matrix Algebra in R
R code for creating A and B, and for computing invA , detA , invB , and detB : Outputs for each operation: Why solve(A) and det(A) behave this way: Since Matrix A is 10x10 and therefore a square, it could technically have an inverse. However, since the determinant of A is 0, it is considered a singular matrix, meaning it does not have full rank and therefore cannot be inverted. Due to this, solve(A) returns an error even though the matrix is a square, yet it is still able to run and confirm the singularity. Why operations on B fail (non‑square matrix): Since Matrix B is 10x100, it is not square. Inverses and determinants can only be defined for square matrices, meaning both solve(B) and det(B) return errors. Though it is expected, it highlights how important it is to check matrix dimensions before attempting further operations. Notes on numeric stability or performance: There are important considerations w...