# Function cot Calculate the cotangent of a value. `cot(x)` is defined as `1 / tan(x)`. For matrices, the function is evaluated element wise. ## Syntax ```js math.cot(x) ``` ### Parameters Parameter | Type | Description --------- | ---- | ----------- `x` | Number | Boolean | Complex | Unit | Array | Matrix | Function input ### Returns Type | Description ---- | ----------- Number | Complex | Array | Matrix | Cotangent of x ## Examples ```js var math = mathjs(); math.cot(2); // returns Number -0.45765755436028577 1 / math.tan(2); // returns Number -0.45765755436028577 ``` ## See also [tan](tan.md), [sec](sec.md), [csc](csc.md)