Data Stucture: Matrices
1. Creating a Matrix:
2. Naming Rows and Columns:
3. Accessing Matrix Elements:
4. Matrix Arithmetic:
5. Matrix Transpose:
6. Row and Column Sums:
7. Matrix Multiplication:
8. Extracting Rows and Columns:
9. Combining Matrices:
Create two 2x2 matrices, m4 <- matrix(c(1, 2, 3, 4), nrow = 2)
and m5 <- matrix(c(5, 6, 7, 8), nrow = 2)
. Combine them by row using rbind()
and by column using cbind()
.
10. Matrix Inversion: