#1--------------
a<-1; b<-c(2,3)
c<-c(4,5,6,7); d<-c(8,9,10)
na<-length(a); nb<-length(b)
nc<-length(c); nd<-length(d)
nn<-na+nb+nc+nd; na;nb;nc;nd;nn
#2--------------
vData<-numeric(nc); vData
vData[nn]<-a; vData
vData[(nn-1):(nn-na-nb+1)]<-b; vData
vData[(nn-na-nb):(nn-na-nb-nc+1)]<-c; vData
vData[(nn-na-nb-nc):1]<-d; vData
#3---------------
ns<-length(vData)
mData<-matrix(0,ns,ns); tData<-matrix(0,ns,ns)
mData
#4---------------
for(i in 1:ns){
 mData[i,]<-matrix(vData,1,10)
 tData[,i]<-matrix(vData,1,10)
}
mData; tData
#5----------------
mulData<-mData*tData
colnames(mulData)<-vData; rownames(mulData)<-vData
mulData
#6-----------------
addData<-mData+tData
colnames(addData)<-vData; rownames(addData)<-vData
addData
#7----------------
divData<-mData/tData
colnames(divData)<-vData; rownames(divData)<-vData
divData
#8----------------
mul2<-mData%*%tData  
colnames(mul2)<-vData; rownames(mul2)<-vData
mul2