# SVD in R recomposition

A<-matrix(c(1,1,1,2,0,0,0,1,2,1,0,1,0,1,0,0,0,0,1,0,2,2,1,1,0,0,0,
0,1,1,1,0,0,0,0,0,2,2,1,1), nrow=5,byrow = TRUE)
svd<-svd(A)
U<-svd$$u V<-svd$$v
d<-svd\$d

U%*%d%*%t(V)


Fairly basic question. By the definition of SVD, this matrix should recompose, but it doesn't. I'm clearly making a very stupid mistake here, but I don't understand where this function varies from the definition of SVD.

U%*%diag(d) %*% t(V)