Using full disk synoptic maps of solar background magnetic field (SBMF) captured from the Wilcox Solar Observatory for 30 latitudinal bands for cycles 21-24 principal components (PCs), or eigen vectors of magnetic oscillations are obtained. The PCs are shown to come in pairs assigned to magnetic waves produced by dipole, quadruple, sextuple and octuple magnetic sources. The first pair is linked to dipole magnetic waves with their summary curve revealing a reasonable fit to the averaged sunspot numbers in cycles 21-24. This verifies the previous results and confirms the summary curve as additional proxy of solar activity decreasing towards grand solar minimum in cycles 25-27. There is also a noticeable asymmetry in latitudinal distributions of these PCs showing an increased activity in northern hemisphere in odd cycles and in southern hemisphere in even ones similar to the N-S asymmetries observed in sunspots. The second pair of PCs linked to quadruple magnetic sources, has 50% smaller amplitudes than the first, while their summary curve correlate closely with SXR fluxes in solar flares. Flare occurrences are also linked to variations of the next two pairs of eigen vectors, quadruple and sextuple components, revealing additional periodicity of about 2.75-3.1 years similar to observed oscillations in flares. Strong latitudinal asymmetries in quadruple and sextuple components are correlating with the N-S asymmetries of flare occurrences skewed to southern hemisphere in even cycles and to northern hemisphere in odd ones. PCA of solar magnetic field raises perspectives for simultaneous prediction of general and flaring solar activity.