gives the cotangent of z.


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • The argument of Cot is assumed to be in radians. (Multiply by Degree to convert from degrees.)
  • .
  • Cos[z]/Sin[z] is automatically converted to Cot[z]. TrigFactorList[expr] does decomposition.
  • For certain special arguments, Cot automatically evaluates to exact values.
  • Cot can be evaluated to arbitrary numerical precision.
  • Cot automatically threads over lists.

Background & Context

  • Cot is the cotangent function, which is one of the basic functions encountered in trigonometry. It is defined as the reciprocal of the tangent function: . The equivalent schoolbook definition of the cotangent of an angle in a right triangle is the ratio of the length of the leg adjacent to to the length of the leg opposite it.
  • Cot automatically evaluates to exact values when its argument is a simple rational multiple of . For more complicated rational multiples, FunctionExpand can sometimes be used to obtain an explicit exact value. TrigFactorList can be used to factor expressions involving Cot into terms containing Sin and Cos. To specify an argument using an angle measured in degrees, the symbol Degree can be used as a multiplier (e.g. Cot[30 Degree]). When given exact numeric expressions as arguments, Cot may be evaluated to arbitrary numeric precision. Other operations useful for manipulation of symbolic expressions involving Cot include TrigToExp, TrigExpand, Simplify, and FullSimplify.
  • Cot threads element-wise over lists and matrices. In contrast, MatrixFunction can be used to give the cotangent of a square matrix (i.e. the power series for the cotangent function with ordinary powers replaced by matrix powers) as opposed to the cotangents of the individual matrix elements.
  • Cot is periodic with period , as reported by FunctionPeriod. Cot satisfies the identity , which is equivalent to the Pythagorean theorem. The definition of the cotangent function is extended to complex arguments using the definition , where is the base of the natural logarithm. Cot has poles at for an integer and evaluates to ComplexInfinity at these points. Cot[z] has series expansion sum_(k=0)^infty((-1)^k 2^(2 k) TemplateBox[{{2,  , k}}, BernoulliB] )/((2 k)!)z^(2 k-1) about the origin that may be expressed in terms of the Bernoulli numbers BernoulliB.
  • The inverse function of Cot is ArcCot. The hyperbolic cotangent is given by Coth. Other related mathematical functions include Tan and Cos.


open all close all

Basic Examples  (4)

The argument is given in radians:

Click for copyable input

Use Degree to specify an argument in degrees:

Click for copyable input

Plot over a subset of the reals:

Click for copyable input

Series expansion:

Click for copyable input

Scope  (39)

Generalizations & Extensions  (1)

Applications  (3)

Properties & Relations  (11)

Possible Issues  (2)

Neat Examples  (6)

Introduced in 1988
Updated in 1996