# PostgreSQL Trigonometric Functions

## Description

The PostgreSQL trigonometric functions accept the input values as radians and returns the corresponding values against this function.

## List of Trigonometric Functions

Functions Syntax Description
acos ( ) acos(a) Returns inverse cosine or arc cosine.
asin( ) asin(a) Returns inverse sine or arc sine.
atan( ) atan(a) Returns inverse tangent or arc tangent.
atan2( ) atan2(b,a) Returns inverse tangent of b/a.
cos( ) cos(a) Returns cosine.
cot( ) cot(a) Returns cotangent.
sin( ) sin(a) Returns sine.
tan( ) tan(a) Returns tangent.

## PostgreSQL acos() function

The PostgreSQL acos() returns the inverse cosine of a given argument.

## SQL

```SELECT ACOS(0) AS "Acos (0)",ACOS(1) AS "Acos (1)",ACOS(-1) AS "Acos (-1)";
```

## PostgreSQL asin() function

The PostgreSQL asin() returns the inverse sine of a given argument.

## SQL

```SELECT ASIN(0) AS "Asin (0)",ASIN(1) AS "Asin (1)",ASIN(-1) AS "Asin (-1)";
```

## PostgreSQL atan() function

The PostgreSQL atan() returns the inverse tangent of a given argument.

## SQL

```SELECT ATAN(0) AS "Atan (0)",ATAN(1) AS "Atan (1)",ATAN(2) AS "Atan (2)";
```

## PostgreSQL atan2() function

The PostgreSQL atan2() returns the inverse tangent of a division given in the argument.

## SQL

```SELECT ATAN2(0,1) AS "Atan2 (0,1)", ATAN2(1,0) AS "Atan2 (1,0)", ATAN2(1,-1) AS "Atan2 (1,-1)", ATAN2(-3,2) AS "Atan2 (-3,2)";
```

## PostgreSQL cos() function

The PostgreSQL cos() returns the cosine of a given argument.

## SQL

```SELECT COS(0) AS "Cos (0)",COS(1) AS "Cos (1)",COS(-1) AS "Cos (-1)";
```

## PostgreSQL cot() function

The PostgreSQL cot() returns the cotangent of a given argument.

## SQL

```SELECT COT(0) AS "Cot (0)",COT(1) AS "Cot (1)",COT(-1) AS "Cot (-1)";
```

## PostgreSQL sin() function

The PostgreSQL sin() returns the sine of a given argument.

## SQL

```SELECT SIN(0) AS "Sin (0)",SIN(1) AS "Sin (1)",SIN(-1) AS "Sin (-1)";
```

## PostgreSQL tan() function

The PostgreSQL tan() returns the tangent of a given argument.

## SQL

```SELECT TAN(0) AS "Tan (0)",TAN(1) AS "Tan (1)",TAN(-1) AS "Tan (-1)";
```

photo credit: lednichenkoolga. Photo is used under creative Common License.