Index notation is used in mathematics to refer to the elements of matrices or the components of a vector. The formalism of how indices are used varies according to the discipline. In particular, there are different methods for referring to the elements of a list, a vector, or a matrix, depending on whether one is writing a formal mathematical paper for publication, or when one is writing a computer program.