Function Repository Resource:

# RightTriangleQ

Determine whether a list of side lengths can form a right triangle

Contributed by: Wolfram|Alpha Math Team
 ResourceFunction["RightTriangleQ"][{a,b,c}] determines whether the side lengths a,b and c represent a right triangle. ResourceFunction["RightTriangleQ"][tri] determines whether the triangle tri represents a right triangle.

## Details and Options

ResourceFunction["RightTriangleQ"] supports Triangle input expressions.

## Examples

### Basic Examples (2)

The set of lengths {3, 4, 5} forms a right triangle:

 In[1]:=
 Out[1]=

{2, 3, 4} does not form a right triangle:

 In[2]:=
 Out[2]=

### Scope (2)

RightTriangleQ accepts triangle specifications:

 In[3]:=
 Out[3]=

RightTriangleQ applies to noninteger numbers:

 In[4]:=
 Out[4]=
 In[5]:=
 Out[5]=

### Properties and Relations (2)

To determine whether the given ordering of integers forms a Pythagorean triple, use PythagoreanTripleQ:

 In[6]:=
 Out[6]=
 In[7]:=
 Out[7]=

Note that RightTriangleQ accepts any ordering of the edge lengths when determining if a right triangle can be formed from the edges, while a Pythagorean triple must be ordered:

 In[8]:=
 Out[8]=
 In[9]:=
 Out[9]=

## Publisher

Wolfram|Alpha Math Team

## Version History

• 2.0.0 – 23 March 2023
• 1.0.0 – 18 September 2020

## Author Notes

To view the full source code for RightTriangleQ, run the following code:

 In[1]:=