saving . . . saved TRUE MATRIX MULTIPLICATION has been deleted. TRUE MATRIX MULTIPLICATION has been hidden .
TRUE MATRIX MULTIPLICATION
Title
Question
Hi,
I have a doubt regarding true matrix multiplication.

matrixA as per the video - 45,49,47,22,21,14,12,13,14 
subdata <- captaincy[1:3,c("played","won","lost")] 
> matrixA <- as.matrix(subdata)
> print(matrixA) 
played won lost 
[1] 45 22 12 
[2] 49 21 13 
[3] 47 14 14 

matrixB - my own values <- c(1,0,1,1,0,1,0,1,0)
> matrixB <- matrix(values,nrow=3,ncol=3,byrow=FALSE) 
print(matrixB) 
[,1] [,2] [,3] 
[1,] 1 1 0
[2,] 0 0 1 
[3,] 1 1 0 

true matric multiplication - matrixA %*% matrixB - 
THE RESULTS I AM GETTING  ARE -
 [,1] [,2] [,3] 
1 57 57 22 
2 62 62 21 
3 61 61 14 

THE RESULTS SHOWN IN THE VIDEO - (with matrixB  values of his own <-c(1,0,0,0,1,0,0,0,1))
 [,1] [,2] [,3] 
1 45 22 12 
2 49 21 13 
3 47 14 14 


 Could you please explain where am I  going wrong ? 

Thanks!

R Creating-Matrices-using-Data-Frames 07-08 min 50-60 sec 28-08-24, 4:23 p.m. PRANATHI_KALANGI

Answers:

There is nothing wrong, the results are different because you have changed matrix B of your own. Each time you change any matrix, the resulting matrix multiplication will be different.
24-09-24, 9 a.m. debatosh


Log-in to answer to this question.