CommencerCommencer gratuitement

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?

Cet exercice fait partie du cours

Linear Algebra for Data Science in R

Afficher le cours

Exercice interactif pratique

Passez de la théorie à la pratique avec l’un de nos exercices interactifs

Commencer l’exercice