Skip to main content

Index

Nota

Working with abstract algebra? See Index (Abstract Algebra).

Returns the position of an element on a vector.

Syntax

index(Element, Vector | List)
index(Element, Vector | List, Integer)

Description

Given an element and a vector or list, returns the index of the first occurrence (starting at 1). If the element does not belong to the vector or list, returns 0.

calc.index1.calc.png

Given an element, a vector or list and an integer n, returns the index of the first occurrence after position nn. If the element does not belong to the vector or list, returns 0.

calc.index2.calc.png