Theory of magnetic linear dichroism. Application to matrix-isolated atomic transitions