immutable vs invariant

immutable

adj
  • Unable to be changed without exception. 

  • Not able to be altered in the memory after its value is set initially. 

noun
  • Something that cannot be changed. 

invariant

adj
  • Unaffected by a specified operation (especially by a transformation) 

  • Neither covariant nor contravariant. 

  • not varying; constant 

noun
  • An invariant quantity, function etc. 

How often have the words immutable and invariant occurred in a corpus of books? (source: Google Ngram Viewer )