added random seed to matrix demo