Calculate two matrix in one and multiply