A matrix reduction problem