A triangular number is one that is the sum of all positive integers less than or equal to a given positive integer. A square number is the product of an integer multiplied by itself. A square triangle is both a square and a triangular number. There is no specific relationship between square and triangular numbers, other than the fact that some triangular numbers are also square.
An example of a square triangle is 36, because 36 is the sum of all positive integers less than or equal to 8, making it a triangular number, and is also the product of 6 x 6, making it a square number. It is important not to confuse a triangular number with a cube. A cube is the product of an integer multiplied by itself three times. For instance, 27 is a the product of 3 x 3 x 3. Since triangles have three sides and cubes are multiplied three times, beginner math students sometimes confuse these concepts.
It is possible to find the equation giving all numbers that are both square and triangular by setting the equation of a square number (m^2) equal to the equation of a triangular number (n(n+1)/2) and then solving for n. This leads to the equation n = (-1 + sqrt(1 + 8m^2))/2. It should be noted that this result is only valid if n is a positive integer; thus the equation is restricted by the condition that 1 + 8m^2, the value under the root, must be a square number.