6. Matrix addition. You are given two matrices: X
, Y
, and Z
.
You can check the dimensions of each object in R
with the dim()
function.
In order to perform matrix addition, the dimensions of the two matrices must be identical. Figure out which matrix
can be added to X
and add it. You can add two matrices using the +
operator.