Minimization problems for (R,S)-symmetric and (R,S)-skew symmetric matrices