Hi,
Surely, there is a way to do it with data steps, but you can also do it with the IML procedure.
data matrix_1;
input a b c;
cards;
2 6 7
1 8 3
6 3 8
;
data matrix_2;
input a b c;
cards;
8 3 6
1 7 9
3 6 2
;
run;
proc iml;
edit work.matrix_1;
read all var _NUM_ into matrix_1[colname=numVars];;
close work.matrix_1;
print matrix_1;
edit work.matrix_2;
read all var _NUM_ into matrix_2[colname=numVars];;
close work.matrix_2;
print matrix_2;
mult = matrix_1*matrix_2;
print mult;
subs = matrix_1 - matrix_2;
print subs;
run;
results
Hope that this can help you
Enrique