where A is a square, sparse, symmetric matrix that represents the material properties at nodes, x is the unknown spatial components of the electric or magnetic fields, and b is a known vector that is determined from boundary conditions and forced excitation.