A matrix approach to solving the electrodynamic problems is suggested. The specificity of one is treatment of an electrodynamic system (ES) as an oscillating system with a finite number of the degrees of freedom. The ES is considered as a set of spatially localized so-called partial oscillators (oscillets). Matrices of unit mutual pseudoenergies and unit mutual energies of the oscillators are evaluated. The eigenfrequencies and the eigenfunctions of the ES can be calculated basing on the lumped elements oscillating system matrix theory. A matrix second-order ordinary differential equation is solved for excited potentials of the ES instead of the DpsilaAlembert equation. The main advantage of the matrix electrodynamics is substitution of the solving the partial derivative differential equations by the less computationally intensive linear algebra problems and the ordinary differential equation integration.