1. Learn
  2. /
  3. Courses
  4. /
  5. Linear Algebra for Data Science in R

Exercise

Matrix Multiplication Compatibility

The two matrices generated by the R code below are (small) examples of what are used in neural network models to weigh datasets for prediction:

A = matrix(c(1, 3, 2, -1, 0, 1), nrow = 2, ncol = 3)

B = matrix(c(-1, 1, 2, -3), nrow = 2, ncol = 2)

Often times these collections of weights are applied iteratively using successive applications of matrix multiplication.

Are \(A\) and \(B\) compatible in any way in terms of matrix multiplication? Use A%*%B and B%*%A in the console to check. What are the dimensions of the resulting matrix?

Instructions

50 XP

Possible answers