Components of Algebraic Sets of Commuting and Nearly Commuting Matrices.