Mathematics

Trigonometric Identities: Formula, Rules & Examples

Trigonometric identities are equations involving trigonometric functions that are true for every angle in their common domain. Fundamental examples include sin²θ + cos²θ = 1, tanθ = sinθ/cosθ, secθ = 1/cosθ, and 1 + tan²θ = sec²θ. Unlike a trigonometric equation that may be true only for particular angles, an identity expresses a general relationship between functions. Identities are used to simplify expressions, prove equivalence, transform formulas, solve equations, evaluate exact values, and connect geometric and algebraic forms of trigonometry. The major families include reciprocal identities, quotient identities, Pythagorean identities, even-odd identities, cofunction identities, sum-and-difference formulas, double-angle formulas, half-angle formulas, and product or power-reduction relationships. Domain restrictions remain important because expressions involving division are undefined whenever their denominator is zero.

What Is a Trigonometric Identity?

An identity is an equation that holds for every permitted value of its variable.

For example:

sin²θ + cos²θ = 1

is true for every real θ.

By contrast:

sinθ = 1/2

is an equation true only for particular angles.

That distinction is fundamental:

identity → universally true on its domain

equation → true only for specific solutions

Fundamental Pythagorean Identity

The most important trigonometric identity is:

sin²θ + cos²θ = 1

This comes directly from the Unit Circle.

A unit-circle point has coordinates:

(cosθ, sinθ)

The circle equation is:

x² + y² = 1

Substitute:

x = cosθ

y = sinθ

Therefore:

cos²θ + sin²θ = 1

Rearranged Pythagorean Forms

From:

sin²θ + cos²θ = 1

we can write:

sin²θ = 1 − cos²θ

and:

cos²θ = 1 − sin²θ

These forms are useful when an expression contains only one function and its square.

Example: Find Cosine Magnitude From Sine

Suppose:

sinθ = 3/5

Then:

cos²θ = 1 − 9/25

= 16/25

Therefore:

cosθ = ±4/5

The quadrant determines the correct sign.

The identity determines magnitude but not always sign.

Reciprocal Identities

The reciprocal identities are:

cscθ = 1/sinθ

secθ = 1/cosθ

cotθ = 1/tanθ

Equivalent forms are:

sinθ = 1/cscθ

cosθ = 1/secθ

tanθ = 1/cotθ

These formulas apply wherever both sides are defined.

Secant Example

If:

cosθ = 4/5

then:

secθ = 5/4

The Secant function therefore contains the reciprocal information of cosine.

Cosecant Example

If:

sinθ = −2/3

then:

cscθ = −3/2

Taking a reciprocal preserves the sign of a nonzero value.

Quotient Identities

The two standard quotient identities are:

tanθ = sinθ/cosθ

and:

cotθ = cosθ/sinθ

These can be derived from right-triangle ratios or unit-circle coordinates.

Tangent Quotient Derivation

In a right triangle:

sinθ = opposite/hypotenuse

cosθ = adjacent/hypotenuse

Divide:

sinθ/cosθ

= (opposite/hypotenuse)/(adjacent/hypotenuse)

The hypotenuse factors cancel:

= opposite/adjacent

Therefore:

tanθ = sinθ/cosθ

This connects Sine, cosine, and Tangent.

Second Pythagorean Identity

Start with:

sin²θ + cos²θ = 1

Divide every term by:

cos²θ

Then:

sin²θ/cos²θ + 1 = 1/cos²θ

Therefore:

tan²θ + 1 = sec²θ

So:

1 + tan²θ = sec²θ

Equivalent rearrangement:

sec²θ − tan²θ = 1

Third Pythagorean Identity

Again start with:

sin²θ + cos²θ = 1

Divide by:

sin²θ

Then:

1 + cos²θ/sin²θ = 1/sin²θ

Therefore:

1 + cot²θ = csc²θ

Equivalent form:

csc²θ − cot²θ = 1

Three Main Pythagorean Identities

The complete set is:

sin²θ + cos²θ = 1

1 + tan²θ = sec²θ

1 + cot²θ = csc²θ

Knowing the first allows the other two to be derived rather than memorized independently.

Example Using Secant and Tangent

Suppose:

tanθ = 3/4

Then:

sec²θ = 1 + 9/16

= 25/16

Therefore:

secθ = ±5/4

The sign depends on the quadrant.

Example Using Cosecant and Cotangent

Suppose:

cotθ = 5/12

Then:

csc²θ = 1 + 25/144

= 169/144

Therefore:

cscθ = ±13/12

Again, quadrant information supplies the sign.

Even and Odd Identities

Cosine is even:

cos(−θ) = cosθ

Sine is odd:

sin(−θ) = −sinθ

Tangent is odd:

tan(−θ) = −tanθ

Secant is even:

sec(−θ) = secθ

Cosecant and cotangent are odd:

csc(−θ) = −cscθ

cot(−θ) = −cotθ

Why Even and Odd Identities Matter

These identities simplify negative angles.

For example:

sin(−30°) = −sin30°

Therefore:

sin(−30°) = −1/2

For cosine:

cos(−60°) = cos60°

Therefore:

cos(−60°) = 1/2

Periodic Identities

Sine and cosine have period:

Therefore:

sin(θ + 2π) = sinθ

cos(θ + 2π) = cosθ

Tangent and cotangent have period:

π

Therefore:

tan(θ + π) = tanθ

cot(θ + π) = cotθ

Secant and cosecant repeat every:

Degree Versions

In degrees:

sin(θ + 360°) = sinθ

cos(θ + 360°) = cosθ

tan(θ + 180°) = tanθ

The Degrees and Radians measurement system changes the numerical angle notation but not the underlying identity.

Cofunction Identities

Complementary-angle relationships include:

sinθ = cos(90° − θ)

cosθ = sin(90° − θ)

tanθ = cot(90° − θ)

cotθ = tan(90° − θ)

secθ = csc(90° − θ)

cscθ = sec(90° − θ)

In radians, replace:

90°

with:

π/2

Cofunction Example

Since:

90° − 30° = 60°

we have:

sin30° = cos60°

Both equal:

1/2

Likewise:

tan30° = cot60°

Why Cofunction Identities Work

The two acute angles of a Right Triangle are complementary.

A side opposite one acute angle is adjacent to the other.

Therefore sine for one angle becomes cosine for its complement.

The same side-switching explains the other cofunction identities.

Supplementary-Angle Identities

For angle θ:

sin(180° − θ) = sinθ

cos(180° − θ) = −cosθ

tan(180° − θ) = −tanθ

In radians:

sin(π − θ) = sinθ

cos(π − θ) = −cosθ

tan(π − θ) = −tanθ

These are useful for Quadrant II angles.

Example With 150°

Because:

150° = 180° − 30°

we have:

sin150° = sin30° = 1/2

cos150° = −cos30° = −√3/2

tan150° = −tan30° = −√3/3

Sum Formula for Sine

The sine addition identity is:

sin(A + B) = sinA cosB + cosA sinB

The subtraction version is:

sin(A − B) = sinA cosB − cosA sinB

These formulas can generate exact values for angles not directly present in standard tables.

Example: sin75°

Write:

75° = 45° + 30°

Then:

sin75° = sin45°cos30° + cos45°sin30°

Substitute:

= (√2/2)(√3/2) + (√2/2)(1/2)

Therefore:

sin75° = (√6 + √2)/4

Sum Formula for Cosine

The cosine addition identity is:

cos(A + B) = cosA cosB − sinA sinB

The subtraction identity is:

cos(A − B) = cosA cosB + sinA sinB

Notice that cosine uses the opposite sign between terms compared with the sign inside the angle.

Example: cos75°

Using:

75° = 45° + 30°

we get:

cos75° = cos45°cos30° − sin45°sin30°

Therefore:

cos75° = (√6 − √2)/4

Sum Formula for Tangent

For appropriate domains:

tan(A + B) = (tanA + tanB)/(1 − tanA tanB)

and:

tan(A − B) = (tanA − tanB)/(1 + tanA tanB)

The denominator must be nonzero.

Example: tan75°

Use:

75° = 45° + 30°

Then:

tan75° = [1 + √3/3]/[1 − √3/3]

Simplifying gives:

tan75° = 2 + √3

Double-Angle Identity for Sine

Set:

A = B = θ

in the sine addition formula:

sin(2θ) = sinθ cosθ + cosθ sinθ

Therefore:

sin2θ = 2sinθ cosθ

Double-Angle Identities for Cosine

Starting with:

cos2θ = cos²θ − sin²θ

and using:

sin²θ + cos²θ = 1

we obtain two additional forms:

cos2θ = 2cos²θ − 1

and:

cos2θ = 1 − 2sin²θ

All three are equivalent.

Choosing a Cosine Double-Angle Form

Use:

cos²θ − sin²θ

when both sine and cosine appear naturally.

Use:

2cos²θ − 1

when the expression contains cosine only.

Use:

1 − 2sin²θ

when it contains sine only.

Selecting the convenient form can substantially shorten a simplification.

Double-Angle Identity for Tangent

From the tangent addition formula:

tan2θ = 2tanθ/(1 − tan²θ)

where:

1 − tan²θ ≠ 0

and tangent must be defined at the relevant angles.

Double-Angle Example

Suppose:

sinθ = 3/5

cosθ = 4/5

Then:

sin2θ = 2(3/5)(4/5)

Therefore:

sin2θ = 24/25

Also:

cos2θ = 16/25 − 9/25

Therefore:

cos2θ = 7/25

Half-Angle Identities

From the cosine double-angle formulas:

sin²(θ/2) = (1 − cosθ)/2

cos²(θ/2) = (1 + cosθ)/2

Therefore:

sin(θ/2) = ±√[(1 − cosθ)/2]

cos(θ/2) = ±√[(1 + cosθ)/2]

The sign depends on the quadrant containing θ/2.

Tangent Half-Angle Forms

Useful forms include:

tan(θ/2) = sinθ/(1 + cosθ)

and:

tan(θ/2) = (1 − cosθ)/sinθ

where the relevant denominators are nonzero.

These forms can simplify certain equations and exact-value calculations.

Power-Reduction Identities

Rearranging the half-angle relationships gives:

sin²θ = (1 − cos2θ)/2

cos²θ = (1 + cos2θ)/2

These are useful when an expression contains squared trigonometric functions.

They are especially important in calculus integrals involving powers of sine and cosine.

Example of Power Reduction

Simplify:

2sin²θ

Use:

sin²θ = (1 − cos2θ)/2

Therefore:

2sin²θ = 1 − cos2θ

Product-to-Sum Identities

Common product-to-sum formulas include:

sinA sinB = [cos(A−B) − cos(A+B)]/2

cosA cosB = [cos(A−B) + cos(A+B)]/2

sinA cosB = [sin(A+B) + sin(A−B)]/2

These transform products into sums or differences.

Sum-to-Product Example

One corresponding relationship is:

sinA + sinB = 2sin[(A+B)/2]cos[(A−B)/2]

Such transformations can reveal zeros, factors, or wave combinations that are not obvious in the original expression.

Proving an Identity

When proving an identity, begin with one side and transform it until it matches the other.

A reliable strategy is to:

rewrite secant, cosecant, tangent, and cotangent using sine and cosine

then:

use the Pythagorean identity

then:

factor or combine fractions

Avoid changing both sides independently unless the logic remains completely reversible and clear.

Identity Proof Example 1

Prove:

(1 − sin²θ)/cosθ = cosθ

Start with the left side.

Use:

1 − sin²θ = cos²θ

Then:

cos²θ/cosθ

Therefore:

= cosθ

where:

cosθ ≠ 0

The identity is established on the common domain of the original expression.

Identity Proof Example 2

Simplify:

tanθ cosθ

Use:

tanθ = sinθ/cosθ

Then:

tanθ cosθ = (sinθ/cosθ)cosθ

Therefore:

= sinθ

where cosine is nonzero in the original tangent expression.

Identity Proof Example 3

Prove:

(sec²θ − 1)/tanθ = tanθ

Use:

sec²θ − 1 = tan²θ

Then:

tan²θ/tanθ

Therefore:

= tanθ

on the common domain where the original denominator tanθ is nonzero.

Why Domain Restrictions Matter

An algebraic simplification can remove a denominator, but it cannot restore points excluded by the original expression.

For example:

tanθ cosθ = sinθ

algebraically simplifies to sine.

But the original left side is undefined whenever:

cosθ = 0

because tangent is undefined there.

Therefore an identity should be understood over the domain where both original sides are defined.

Verifying an Identity Numerically

Testing a few angles can help detect an error, but it does not prove an identity.

For example, checking:

sin²30° + cos²30° = 1

confirms one case.

A proof must show the relationship for all permitted θ.

Numerical testing is best used as a diagnostic check.

Simplifying Rational Trigonometric Expressions

Consider:

(1 − cos²θ)/sinθ

Use:

1 − cos²θ = sin²θ

Then:

sin²θ/sinθ

Therefore:

= sinθ

on the common domain where:

sinθ ≠ 0

Factoring With Trigonometric Identities

Expressions can often be treated like algebraic polynomials.

For example:

sec²θ − tan²θ

is immediately:

1

But:

sec⁴θ − tan⁴θ

can be factored:

(sec²θ − tan²θ)(sec²θ + tan²θ)

Therefore:

sec⁴θ − tan⁴θ = sec²θ + tan²θ

because the first factor is:

1

Converting Everything to Sine and Cosine

Consider:

secθ − cosθ

Rewrite:

1/cosθ − cosθ

Use a common denominator:

(1 − cos²θ)/cosθ

Then:

sin²θ/cosθ

This can also be written:

sinθ tanθ

depending on the desired final form.

Rationalizing Trigonometric Expressions

Conjugates can simplify expressions such as:

1/(1 + sinθ)

Multiply numerator and denominator by:

1 − sinθ

Then:

(1 − sinθ)/(1 − sin²θ)

Use:

1 − sin²θ = cos²θ

Therefore:

(1 − sinθ)/cos²θ

This may then be rewritten in reciprocal or quotient functions if useful.

Solving Equations With Identities

Identities can transform a trigonometric equation into a simpler form.

For example:

2sin²θ = 1

Use:

sin²θ = (1 − cos2θ)/2

Then:

1 − cos2θ = 1

So:

cos2θ = 0

Alternatively, solve:

sin²θ = 1/2

directly.

The best identity depends on the desired solution method.

Equation Example

Solve:

sec²θ − 3 = 0

Use:

sec²θ = 1 + tan²θ

Then:

1 + tan²θ − 3 = 0

So:

tan²θ = 2

Therefore:

tanθ = ±√2

The interval specified by the problem determines the complete set of angles.

Identity Versus Equation Transformations

When solving equations, squaring both sides or multiplying by an expression that may equal zero can create or remove possible solutions.

Therefore solutions should be checked against the original equation.

An identity transformation that is valid over a shared domain is safer than an irreversible algebraic manipulation.

Reciprocal Functions and Zeros

Because:

secθ = 1/cosθ

secant is undefined when:

cosθ = 0

Because:

cscθ = 1/sinθ

cosecant is undefined when:

sinθ = 0

Because:

cotθ = cosθ/sinθ

cotangent is also undefined when:

sinθ = 0

These restrictions matter when simplifying identities.

Tangent and Secant Domain Connection

The mapped Secant and tangent functions are both undefined wherever:

cosθ = 0

This makes:

1 + tan²θ = sec²θ

particularly natural because both sides share the same basic domain exclusions.

Unit Circle Sign Rules

The unit circle determines function signs by quadrant:

Quadrant I: sin +, cos +, tan +

Quadrant II: sin +, cos −, tan −

Quadrant III: sin −, cos −, tan +

Quadrant IV: sin −, cos +, tan −

Identities involving square roots require these sign rules.

Example With a Quadrant

Suppose:

cosθ = −3/5

and θ lies in Quadrant II.

Then:

sin²θ = 1 − 9/25

= 16/25

Because sine is positive in Quadrant II:

sinθ = 4/5

Therefore:

tanθ = (4/5)/(−3/5)

So:

tanθ = −4/3

Trigonometric Identities in Triangle Solving

The mapped Triangle Solving framework uses identities to connect different side-angle ratios.

For example:

sin²θ + cos²θ = 1

mirrors the normalized Pythagorean theorem in a right triangle.

If one trigonometric ratio is known, identities can often recover others before solving the remaining sides or angles.

Right Triangle Interpretation

Suppose a right triangle has:

opposite = a

adjacent = b

hypotenuse = c

Then:

sinθ = a/c

cosθ = b/c

The Pythagorean theorem gives:

a² + b² = c²

Divide by c²:

a²/c² + b²/c² = 1

Therefore:

sin²θ + cos²θ = 1

The fundamental identity is literally the Pythagorean theorem expressed as ratios.

Orthocenter Geometry

The mapped Triangle Orthocenter creates right-angle constructions throughout a triangle.

Complementary-angle identities such as:

sin(90°−θ) = cosθ

frequently arise when altitudes split a triangle into smaller right triangles.

The orthocenter itself is a geometric point, while the identities describe the angular relationships created by its altitudes.

Triangle Medians and Identities

The mapped Triangle Medians do not generally create right angles, so trigonometric identities are not built directly into the median definition.

However, a median can divide a triangle into two smaller triangles where the Law of Cosines, sine area formula, or other trigonometric relations are applied.

In an isosceles triangle, the apex median is also an altitude, making right-triangle identities directly useful.

Triangle Incenter and Half-Angles

The mapped Triangle Incenter lies on all three internal angle bisectors.

Therefore half-angle expressions occur naturally.

For example:

∠BAI = A/2

and formulas involving:

sin(A/2)

cos(A/2)

can relate the incenter to side lengths and the inradius.

Incenter Half-Angle Relationship

A useful identity-based relationship is:

r = 4R sin(A/2)sin(B/2)sin(C/2)

where:

r = inradius

R = circumradius

The half-angle factors arise directly from the triangle’s angle-bisector geometry.

Law of Sines as a Trigonometric Relationship

The Law of Sines states:

a/sinA = b/sinB = c/sinC

It is not usually classified as an elementary identity because it relates the geometry of a particular triangle rather than holding for arbitrary independent variables.

However, its derivations rely heavily on sine relationships.

Law of Cosines Connection

The Law of Cosines:

c² = a² + b² − 2ab cosC

reduces to the Pythagorean theorem when:

C = 90°

because:

cos90° = 0

This illustrates how exact trigonometric values can transform general geometric formulas into special cases.

Polar and Rectangular Coordinates

The Polar and Rectangular Form relationships are:

x = r cosθ

y = r sinθ

Therefore:

x² + y² = r²(cos²θ + sin²θ)

Use:

cos²θ + sin²θ = 1

Then:

x² + y² = r²

The Pythagorean identity guarantees consistency between polar and rectangular distance.

Slope and Tangent Identity

For a line with direction angle θ:

m = tanθ

Using the quotient identity:

m = sinθ/cosθ

This relates vertical and horizontal components of a direction vector.

The Slope interpretation is therefore a direct geometric application of a trigonometric identity.

Regular Polygon Formulas

The Regular Polygon Area formula:

A = ns²/[4tan(π/n)]

contains tangent because central triangles are split into right triangles.

Identity transformations can convert the same geometry into circumradius or apothem forms involving sine and cosine.

For example:

s = 2R sin(π/n)

and:

a = R cos(π/n)

Product Identity in Polygon Geometry

Multiplying:

s = 2R sin(π/n)

and:

a = R cos(π/n)

and using:

2sinx cosx = sin2x

leads naturally toward:

A = nR²sin(2π/n)/2

Thus a double-angle identity connects two common regular-polygon area forms.

Periodic Modeling

Functions such as:

y = A sin(Bx + C) + D

or:

y = A cos(Bx + C) + D

model periodic behavior.

Identities allow equivalent wave expressions to be combined, shifted, or transformed.

For example, a linear combination:

a sinx + b cosx

can be rewritten as a single shifted sinusoid.

Combining Sine and Cosine

An expression:

a sinx + b cosx

can be written:

R sin(x + φ)

where:

R = √(a²+b²)

and φ is chosen so that:

R cosφ = a

R sinφ = b

This is a useful identity-based transformation in oscillation and signal problems.

Example of Combining Functions

Consider:

3sinx + 4cosx

Since:

R = √(9+16)

= 5

choose φ such that:

cosφ = 3/5

sinφ = 4/5

Then:

3sinx + 4cosx = 5sin(x+φ)

This immediately shows the expression’s maximum magnitude is:

5

Identity Strategy: Look for Squares

If you see:

sin²θ + cos²θ

replace it with:

1

If you see:

1 − sin²θ

replace it with:

cos²θ

If you see:

1 − cos²θ

replace it with:

sin²θ

This is often the fastest simplification step.

Identity Strategy: Look for 1 + tan²θ

Replace:

1 + tan²θ

with:

sec²θ

Likewise:

sec²θ − 1 = tan²θ

and:

csc²θ − 1 = cot²θ

Recognizing these patterns prevents unnecessary algebra.

Identity Strategy: Rewrite Quotient Functions

If an expression contains:

tanθ

or:

cotθ

rewriting them as:

sinθ/cosθ

or:

cosθ/sinθ

often allows cancellation with other sine and cosine factors.

Identity Strategy: Rewrite Reciprocals

If secant and cosine appear together:

secθ cosθ = 1

where defined.

Similarly:

cscθ sinθ = 1

cotθ tanθ = 1

These reciprocal pairs can make complicated-looking expressions collapse immediately.

Identity Strategy: Use a Common Denominator

Suppose:

sinθ/(1+cosθ) + sinθ/(1−cosθ)

A common denominator gives:

sinθ[(1−cosθ)+(1+cosθ)]/(1−cos²θ)

Simplify numerator:

2sinθ

Use:

1−cos²θ = sin²θ

Therefore:

2/sinθ

So:

= 2cscθ

on the common domain.

Identity Strategy: Factor First

Before applying a trig identity, ordinary algebraic factoring may help.

For example:

sin²θ − cos²θ

is already related to:

−cos2θ

But an expression such as:

sin⁴θ − cos⁴θ

factors as:

(sin²θ−cos²θ)(sin²θ+cos²θ)

Since:

sin²θ+cos²θ = 1

the expression becomes:

sin²θ−cos²θ

or:

−cos2θ

Common Trigonometric Identity Mistakes

A common mistake is treating an equation true for one angle as an identity.

Another is writing:

sin(A+B) = sinA + sinB

which is false in general.

The correct formula is:

sin(A+B) = sinAcosB + cosAsinB

Likewise:

cos(A+B)

is not:

cosA + cosB

Pay attention to domain restrictions when canceling sine or cosine factors.

When taking square roots from squared identities, include the:

±

possibility until the quadrant determines the sign.

Do not confuse reciprocal notation:

secθ = 1/cosθ

with inverse notation such as:

cos⁻¹x

Finally, remember that numerical testing supports a derivation but does not prove an identity.

Frequently Asked Questions

What are trigonometric identities?

They are equations involving trigonometric functions that are true for every value in their common domain.

What is the fundamental trigonometric identity?

sin²θ + cos²θ = 1

What are the reciprocal identities?

cscθ = 1/sinθ

secθ = 1/cosθ

cotθ = 1/tanθ

What are the quotient identities?

tanθ = sinθ/cosθ

cotθ = cosθ/sinθ

What are the three Pythagorean identities?

sin²θ + cos²θ = 1

1 + tan²θ = sec²θ

1 + cot²θ = csc²θ

Is sine odd or even?

Sine is odd:

sin(−θ) = −sinθ

Is cosine odd or even?

Cosine is even:

cos(−θ) = cosθ

Is tangent odd or even?

Tangent is odd:

tan(−θ) = −tanθ

What is the sine addition formula?

sin(A+B) = sinAcosB + cosAsinB

What is the cosine addition formula?

cos(A+B) = cosAcosB − sinAsinB

What is the tangent addition formula?

tan(A+B) = (tanA+tanB)/(1−tanA tanB)

What is the sine double-angle identity?

sin2θ = 2sinθcosθ

What are the cosine double-angle identities?

cos2θ = cos²θ − sin²θ

cos2θ = 2cos²θ − 1

cos2θ = 1 − 2sin²θ

What is the tangent double-angle formula?

tan2θ = 2tanθ/(1−tan²θ)

What are the power-reduction identities?

sin²θ = (1−cos2θ)/2

cos²θ = (1+cos2θ)/2

How do you prove a trigonometric identity?

Transform one side using known identities and algebra until it matches the other side on the common domain.

Why do domain restrictions matter?

Simplification cannot make an originally undefined expression valid at excluded angles.

How can I check a trigonometric identity?

Derive it algebraically from established identities, then optionally test several permitted angles as an additional numerical check.

Mehran Khan

Mehran Khan is the primary author at The Logic Library and CEO & Founder of One Digit Media. With 10+ years of experience in software engineering, SEO, and digital publishing, he uses a research-led approach to Logics, Maths, Tech, Formulas, Science, and AI.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button