Suppose I have 3 matrices C,W, and S
C <- matrix(1:3)
W <- matrix(2:4)
S <- matrix(3:5)
I want to make a matrix with those matrices as elements. Say matrix K, but each element of matrix K being a matrix itself. Just as a list of matrices works, but instead in a matrix form. I.e.:
> K
[,1] [,2] [,3]
[1,] C 0 0
[2,] 0 W S
C, W and S would each be matrix objects stored inside the larger matrix K.
Ultimately, I would like to be able to then use matrix multiplication like K %*% K or similar.