Module 5: Matrix Algebra in R
GitHub Link: r-programming-assignments/Assignment_05.R at main · AustinTCurtis/r-programming-assignments On your blog, include: R code for creating A and B, and for computing invA , detA , invB , and detB . Output or error messages for each operation. A brief explanation: Why solve(A) and det(A) work. Why operations on B fail (non‑square matrix). Any notes on numeric stability or performance. R Code: > # Create matrices > A <- matrix(1:100, nrow = 10) # 10 x 10 > B <- matrix(1:1000, nrow = 10) # 10 x 100 > > #Inspect Dimension > cat("dim(A): ", paste(dim(A), collapse = " x "), "\n") # expected 10 x 10 dim(A): 10 x 10 > cat("dim(B): ", paste(dim(B), collapse = " x "), "\n") # expected 10 x 100 dim(B): 10 x 100 > > is_square <- function(M) { d <- dim(M); d[1] == d[2] } > cat("Is A square? ", is_square(A), "\n") Is A square? TRUE > cat("Is B ...