Data Stucture: Matrices
Caution 1. Creating a Matrix:
Caution 2. Naming Rows and Columns:
Caution 3. Accessing Matrix Elements:
Caution 4. Matrix Arithmetic:
Caution 5. Matrix Transpose:
Caution 6. Row and Column Sums:
Caution 7. Matrix Multiplication:
Caution 8. Extracting Rows and Columns:
Caution 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()
.
Caution 10. Matrix Inversion: