Tuesday, August 31, 2010

Five kinds of double-negation

A recent question on the TYPES mailing list reminded me that one reason negation is confusing is because it can mean so many different things. I and others originally thought the answer the person was looking for (the type-theoretic reading of negation) was "continuations", but it turned out his intuition was about a different form of negation not usually considered in constructive logic (but available in "refinement type systems", etc.), since it's tied to the "extrinsic" interpretation of types-as-properties. (For more on this deficit of constructive logic, see the introduction to Paul Taylor's Subspaces in Abstract Stone Duality.)

But even restricted to plain old type theory, there are many different interpretations of negation! Under the principle of "Why talk about something confusing when you can talk about something doubly confusing?", today I want to talk about different computational interpretations of double negations in logic.

  1. (A -> 0) -> 0. Here 0 is falsehood, and this is the standard interpretation of double-negation in intuitionistic logic. What does this mean computationally? Well, one way to think about this is to interpret types as sets. How many different functions f : X -> 0 are there from any set X into the empty set? None, unless X is itself empty, in which case there is exactly one. Applying this reasoning to our double-negation, if A is non-empty, then A -> 0 is empty, which in turn means that (A -> 0) -> 0 contains exactly one element; conversely, if A is empty, then A -> 0 is non-empty, which in turns means that (A -> 0) -> 0 is empty. What we see is that intuitionistic double-negation encodes the principle of proof-irrelevance, i.e., it forgets all the computational content of a type. (The catch here is that set-theoretic reasoning doesn't always prove type isomorphisms—this argument really only works for extensional type theory.)
  2. (A -> ⊥) -> ⊥. Here ⊥ represents "minimal" falsehood, i.e., simply a logical atom with no introduction or elimination rules, and in particular without the principle of explosion. Because we have replaced "empty" with "unknown", minimal double-negation does not have the same computational degeneracy of intuitionistic double-negation: there are at least as many different constructive proofs of (A -> ⊥) -> ⊥ as there are of A, and often more. For example, in general there is no proof in minimal logic of excluded middle A ∨ (A -> ⊥), but there is a proof of ((A ∨ (A -> ⊥)) -> ⊥) -> ⊥. Indeed, minimal logic rather than intuitionistic logic really is the proper place to understand the computational content of the classical double-negation translations (something which I didn't fully appr! eciate until reading Jeremy Avigad's The computational content of classical arithmetic). As such, this form of double-negation is the first step towards understanding continuation-passing style.
  3. (A -> R) -> R, where R is any type of answers. We said that ⊥ above is a logical atom. In type-theoretic terms, it is a type variable. So to move to this form double-negation, we simply instantiate the variable with a concrete type R. Now, logically we are beginning to stretch the meaning of "negation". In particular, nothing says that R is uninhabited—indeed if it is provably uninhabited, we are back to the computationally degenerate situation (1). But whether or not we accept the terminology, this form of double-negation is extremely important computationally, tied to the representation of control flow. A function of type A -> R is a continuation (transforming any value of type A into a result of type R), and so a term of type (A -> R) -> R is something which takes a continuation to a result—a computation with "control effects". The type (A -> R) -> R is so powerful that it comes with the following warning:
    Abuse of the Continuation monad can produce code that is impossible to understand and maintain.
    The "principle of double-confusion" I mentioned at the beginning then motivates the following pair of generalizations...
  4. (A -> R1) -> R2, where R1 and R2 are two (possibly distinct) types of answers. This form of double-negation comes up in the study of delimited control operators, which were originally motivated by the fact that the type (A -> R) -> R is not only too powerful but also not powerful enough. The type (A -> R1) -> R2 can be seen as a sort of Hoare triple {R1}A{R2}, which gives an intimation of its power.
  5. ∀α.(A -> α) -> α, a polymorphic type (and more generally, ∀α.(A -> Tα) -> Tα, where T is an arbitrary monad). It's easy to see that A ≡ ∀α.(A -> α) -> α is provable in second-order intuitionistic logic, but in fact this can also be interpreted as the Yoneda isomorphism in category theory, as sigfpe explained a few years ago. More generally, there is a Yoneda isomorphism between TA and ∀α.(A -> Tα) -> Tα for any monad T (and formally, a type isomorphism in System F + parametricity axioms). This isomorphism lies at the heart of Filinski's representation theorem that delimited control operators can be used to perform "monadic reflection".
So that is a small cast of characters, biased towards the view of "negation as continuation" (which as I said, is not the only view). For more plots involving these different forms of double-negation (particularly (4) and (5)), you can read the paper I posted two weeks ago.

kinds of sets

Two UFO finishes.

"Finished" is not strictly correct, as these two items still have to have some kind of border and backing on them, but at least the cross stitching is complete. This round robin sampler has been hanging around since 2003, and I am so pleased to see it out of my WIP basket! This is the sampler that will have a border of Aboriginal design fabric. I've got that out on my desk, ready to go, so hopefully I'll get it done this weekend.
I started these chooks on a whim a year or so ago, because I just love the design. I don't know what I'll do with it yet. Once I attach a border it could be a placemat, or maybe part of a larger wall hanging with other patchwork and stitchery projects using chooks and roosters. Time will tell.

how to put two pictures on top of each other

AKINATOR, THE WEB GENIUS


Think of a character, dead or alive, real or fictitious, and the genius will read your mind. Try it, it's a lot of fun!!

how does akinator work

My personal reflection after reading What Is “Good” Education Research? by Karl Hostetler

My personal reflection after reading What Is “Good” Education Research? by Karl Hostetler
EDUCATIONAL RESEARCHER 2005; 34; 16.

Generally good research has an appropriate number of subjects to survey or interview, yields reproducible results or provides for independent review of qualitative data. But this is not enough!

I totally agree that good education research is about what beneficial aims and results that serve people’s well-being.

But what are the conditions under which that good educational research can flourish?

I feel that researchers argue about research terms and some times might miss the whole point about being a researcher.
The example used is especially vivid and useful to me when relating to research that abound around me, so that my bearings will continue to be to serves the human kind’s well-being. My current work on Easy Java Simulation is well within the classification of serving the world's learning needs for simulations for sense making in physics education. I have been fortunate to meet the Fu-Kwun Hwang, Francisco Esquembre &; Christian Wolfgang  and that i have been making my personal and professional life meaningful.


Example of Research Debate that is not good research.
"Effectiveness of thumbscrews as a means of torture. A quantitative researcher might say we need a random sample of subjects and some quantifiable measure of results, say the pitch and duration of victims’ shrieks. A qualitative re-searcher could retort that such data are inadequate,and might want to interview the victims to get a thicker and richer narrative of their experience and its meaning for them. Of course, we might realize that we do not have an either–or choice here. We say that both approaches, or some “multi-methods”approach, can provide useful data o theorists and practitioners of torture."

This paper also mention the "Learn What?" Noddings (1992) which points to the challenges and issues of current school system around the world of herding children instead of providing liberating education.

This paper also talks about not only to serve well-being but also to understand how they are serving it, which is the translation aspects of research work has to impact the schools for the better, and not isolated and incubated in one or some pilot schools.

The Complexity of Goods tells me that many organization articulate different versions of what constitute good, more usual than not, it serves some political party's conception of good for the people, good for the nation etc. This paper argues that we need to be aware of the influences that define good because what is good to some is good to these people, at this time, in this situation, is not good to another group of people, in a different country.

The Complexity of a Good Life presents a view of "at what cost?".  At the cost of reducing violence in school, students also discouraged students from exercising force of character and judgment. An example i can related to is the introduction of school based national assessment in science practical which some might argue has taken the joy of learning aka "love to learn" science away from the students. The intention of many great education policy is hard to fault, only the execution of the theory is not achieving the strategic aim of preparing students for a life of learning, but instead what student faces is a series of examinations for life.

The paper mentioned that unfortunately, these days many people tend to want to end research with answers. Given the state of U.S education, with the attendant pressure to produce “results,” one can understand why people look for “answers.”And the problems are not limited to elementary and high school. Sometimes, good research does not provide answers but give you more reason to benefit human kind.

Increasing emphasis on grants (corporate model) in higher education can promote conditions where winning grants will become an end in itself rather than a mean to accomplishing something worthwhile. All these sounds all so familiar. All are not alone :)

graphical method in physics

Word problems in Singapore math and bar diagrams

If you're interested in Singapore math's word problems, and how their bar diagrams work, check out this blog entry by Denise at Let's Play Math:

Pre-algebra problem solving: 3rd grade

She goes through a bunch of word problems from Singapore Math 3-A book, and explains both a solution based on algebraic thinking, and a solution with bar diagrams.

It's good reading for all of us who teach, actually.


free math word problems

Triangle

A triangle.

A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments. A triangle with vertices A, B, and C is denoted ABC.

In Euclidean geometry any three non-collinear points determine a unique triangle and a unique plane (i.e. a two-di! mensional Euclidean space).


Types of triangles

By relative lengths of sides

Triangles can be classified according to the relative lengths of their sides:

  • In an equilateral triangle, all sides are the same length. An equilateral triangle is also a regular polygon with all angles equal to 60°.[1]
  • In an isosceles tri! angle, two sides are equal in length. (Traditionally, only two sides equal, but sometimes at least two.)[2] An isosceles triangle also has two equal angles: the angles opposite the two equal sides.
  • In a scalene triangle, all sides and internal angles are different from one another.[3]
Isosceles triangle
Equilateral Triangle Scalene triangle
Equilateral Isosceles Scalene

By internal angles

Triangles can also be classified according to their internal angles, mea! sured here in degrees.

  • A right triangle (or right-angled triangle, formerly called a rectangled triangle) has one of its internal angles equal to 90° (a right angle). The side opposite to the right angle is the hypotenuse; it is the longest side in the right triangle. The other two sides are the legs or catheti[citation needed] (singular: cathetus) of the triangle. Right triangles obey the Pythagorean theorem: the sum of the squares of the two legs is equal to the square of the hypotenuse: a2 + b2 = c2, where a and b are the lengths of the legs and c is the length of the hypotenuse. Special right triangles are right triangles with additional properties that make calculations involving them easier.
  • Triangles that do not have a 90° internal angle are called oblique triangles.
  • A triangle that has all the internal angles smaller than 90° is an acute triangle or acute-angled triangle.
  • A triangle that has one angle larger than 90° is an obtuse triangle or obtuse-angled triangle.
  • An equilateral triangle is an acute triangle with all three internal angles equal to 60°.
Right
Right triangle Obtuse triangle Acute triangle
Obtuse Acute
\underbrace{\qquad \qquad \qquad \qquad \qquad \qquad}_{}
Oblique

[edit] Basic facts

Triangles are assumed to be two-dimensional plane figures, unless the context provides otherwise (see Non-planar triangles, below). In rigorous treatments, a triangle is therefore called a 2-simplex (see also Polytope). Elementary facts about triangles were presented by Euclid in books 1–4 of his Elements, around 300 BCE.

A triangle, showing exterior angle d

The internal angles of a triangle in Euclidean space always add up to 180 degrees. This allows determination of the third angle of any triangle as soon as two angles are known. An external angle, or exterior angle, of a triangle is an angle that is adjacent and supplementary to an internal angle. Any external angle of any triangle is equal to the sum of the two internal angles that it is not adjacent to; this is the exterior angle theorem. The three external angles (one for each vertex) of any triangle add up to 360 degrees.[4]

The sum of the lengths of any two sides of a triangle always exceeds the length of the third side, a principle known as the triangle inequality.[5]

Two triangles are said to be similar if and only if each internal angle of one triangle is equal to an internal angle of the other.[6] In this case, all sides of one triangle are in equal proportion to sides of the other triangle.

A few basic postulates and theorems about similar triangles:

  • If two corresponding internal angles of two triangles are equal, the triangles are similar.
  • If two corresponding sides of two triangles are in proportion, and their included angles are equal, then the triangles are similar. (The included angle for any two sides of a polygon is the internal angle between those two sides.)
  • If three corresponding sides of two triangles are in proportion, then the triangles are similar.[7]

Two triangles that are congruent have exactly the same size and shape:[8] all pairs of corresponding internal angles are equal in size, and all pairs of corresponding sides are equal in length. (This is a total of six equalities, but three are often sufficient to prove congruence.)

Some sufficient conditions for a pair of triangles to be congruent (from basic postulates and theorems of Euclid):

  • SAS Postulate: Two sides and the included angle in a triangle are equal to two! sides and the included angle in the other triangle.
  • A! SA Postu late: Two internal angles and the included side in a triangle are equal to those in the other triangle. (The included side for a pair of angles is the side between them.)
  • SSS Postulate: Each side of a triangle is equal in length to a side of the other triangle.
  • AAS Theorem: Two angles and a corresponding non-included side in a triangle are equal to those in the other triangle.
  • Hypotenuse-Leg (HL) Theorem: The hypotenuse and a leg in a right triangle are equal to those in the other right triangle.
  • Hypotenuse-Angle Theorem: The hypotenuse and an acute angle in one right triangle are equal to those in the other right triangle.

An important case:

  • Side-Side-Angle (or Angle-Side-Side) condition: If two sides and a corresponding non-included angle of a triangle are equal to those in another, then this is not sufficient to prove congru! ence; but if the non-included angle is obtuse or a right angle, or the side opposite it is the longest side, or the triangles have corresponding right angles, then the triangles are congruent. The Side-Side-Angle condition does not by itself guarantee that the triangles are congruent because one triangle could be obtuse-angled and the other acute-angled.

Using right triangles and the concept of similarity, the trigonometric functions sine and cosine can be defined. These are functions of an angle which are investigated in trigonometry.

The Pythagorean theorem

A central theorem is the Pythagorean theorem, which states in any right triangle, the square of the length of the hypotenuse equals the sum of the squares of the lengths of the two other sides. If the hypotenuse has length c, and the legs have lengths a and b, then the theorem states that

a^2 + b^2 = c^2.\,\!

The converse is true: if the lengths of the sides of a triangle satisfy the above equation, then the triangle has a right angle opposite side c.

Some other facts about right triangles:

a + b + 90^{\circ} = 180^{\circ} \Rightarrow a + b = 90^{\circ} \Rightarrow a = 90^{\circ} - b
  • If the legs of a right triangle are equal, then the angles opposite the legs are equal, acute, and complementary; each is therefore 45 degrees. By the Pythagorean theorem, the length of the hypotenuse is the length of a leg times √2.
  • In a right triangle with acute angles measuring 30 and 60 degrees, the hypoten! use is twice the length of the shorter side, and twice the len! gth divi ded by √3 for the longer side.

For all triangles, angles and sides are related by the law of cosines and law of sines (also called the cosine rule and sine rule).

Points, lines and circles associated with a triangle

There are hundreds of different constructions that find a special point associated with (and often inside) a triangle, satisfying some unique property: see the references section for a catalogue of them. Often they are constructed by finding three lines associated in a symmetrical way with the three sides (or vertices) and then proving that the three lines mee! t in a single point: an important tool for proving the existence of these is Ceva's theorem, which gives a criterion for determining when three such lines are concurrent. Similarly, lines associated with a triangle are often constructed by proving that three symmetrically constructed points are collinear: here Menelaus' theorem gives a useful general criterion. In this section just a few of the most commonly-encountered constructions are explained.

The circumcenter is the center of a circle passing through the three vertices of the triangle.

A perpendicular bisector of a triangle is a straight line passing through the midpoint of a side and being perpendicular to it, i.e. forming a right angle wit! h it. The three perpendicular bisectors meet in a single point, the triangle's circumcenter; this point is the center of the circumcircle, the circle passing through all three vertices. The diameter of this circle can be found from the law of sines stated above.

Thales' theorem implies that if the circumcenter is located on one side of the triangle, then the opposite angle is a right one. More is true: if the circumcenter is located inside the triangle, then the triangle is acute; if the circumcenter is located outside the triangle, then the triangle is obtuse.

The intersection of the altitudes is the orthocenter.

An altitude of a triangle is a straight line through a vertex and perpendicular to (i.e. forming a right angle with) the opposite side. This opposite side is called the ba! se of the altitude, and the point where the altitude intersects the base (or its extension) is called the foot of the altitude. The length of the altitude is the distance between the base and the vertex. The three altitudes intersect in a single point, called the orthocenter of the triangle. The orthocenter lies inside the triangle if and only if the triangle is acute. The three vertices together with the orthocenter are said to form an orthocentric system.

The intersection of the angle bisectors finds the center of the incircle.

An angle bisector of a triangle is a straight line through a vertex which cuts the corresponding angle in half. The three angle bisectors intersect in a single point, the incenter, the center of the triangle's incircle. The inc! ircle is the circle which lies inside the triangle and touches all three sides. There are three other important circles, the excircles; they lie outside the triangle and touch one side as well as the extensions of the other two. The centers of the in- and excircles form an orthocentric system.

The intersection of the medians is the centroid.

A median of a triangle is a straight line through a vertex and the midpoint of the opposite side, and divides the triangle into two equal areas. The three medians intersect in a single point, the triangle's centroid. The centroid of a stiff triangular object (cut out of a thin sheet of uniform density) is also its center of gravit! y: the object can be balanced on its centroid. The centroid cuts every median in the ratio 2:1, i.e. the distance between a vertex and the centroid is twice the distance between the centroid and the midpoint of the opposite side.

Nine-point circle demonstrates a symmetry where six points lie on the edge of the triangle.

The midpoints of the three sides and the feet of the three altitudes all lie on a single circle, the triangle's nine-point circle. The remaining three points for which it is named are the midpoints of the portion of altitude between the vertices and the orthocenter. The radius of the nine-point circle is half that of the circumcircle. It touches the incircle (at the Feuerbach point) and the three excircles.

Euler's line is a straight line through the centroid (orange), orthocenter (blue), circumcenter (green) and center of the nine-point circle (red).

The centroid (yellow), or! thocenter (blue), circumcenter (green) and barycenter of the n! ine-poin t circle (red point) all lie on a single line, known as Euler's line (red line). The center of the nine-point circle lies at the midpoint between the orthocenter and the circumcenter, and the distance between the centroid and the circumcenter is half that between the centroid and the orthocenter.

The center of the incircle is not in general located on Euler's line.

If one reflects a median at the angle bisector that passes through the same vertex, one obtains a symmedian. The three symmedians intersect in a single point, the symmedian point of the triangle.

Computing the area of a triangle

The area of a triangle can be demonstrated as half of the area of a paralellogram which has the same base length and he! ight.

Calculating the area of a triangle is an elementary problem encountered often in many different situations. The best known and simplest formula is:

A=\frac{1}{2}bh

where A is area, b is the length of the base of the triangle, and h is the height or altitude of the triangle. The term 'base' denotes any side, and 'height' denotes the length of a perpendicular from the point opposite the side onto the side itself.

Although simple, this formula is only useful if the height can be readily found. For example, the surveyor of a triangular field measures the length of each side, and can find the area from his results without having to construct a 'height'. Various methods may be used in practice, depending on what is k! nown about the triangle. The following is a selection of frequently used formulae for the area of a triangle.[9]

Using vectors

The area of a parallelogram can be calculated using vectors. Let vectors AB and AC point respectively from A to B and from A to C. The area of parallelogram ABDC is then |{AB}\times{AC}|, which is the magnitude of the cross product of vectors AB! and AC. |{AB}\times{AC}| is equal to |{h}\times{AC}|, where h represents the altitude h as a vector.

The area of triangle ABC is half of this, or S = \frac{1}{2}|{AB}\times{AC}|.

The area of triangle ABC can also be expressed in terms of dot products as follows:

\frac{1}{2} \sqrt{(\mathbf{AB} \cdot \mathbf{AB})(\mathbf{AC} \cdot \mathbf{AC}) -(\mathbf{AB} \cdot \mathbf{AC})^2} =\frac{1}{2} \sqrt{ |\mathbf{AB}|^2 |\mathbf{AC}|^2 -(\mathbf{AB} \cdot \mathbf{AC})^2} \, .
Applying trigonometry to find the altitude h.

Using trigonometry

The height of a triangle can be found through an application of trigonometry. Using the labelling as in the image on the left, the altitude is h = a sin γ. Substituting this in the formula ! S = ½bh derived above, the area of the triangl! e can be expressed as:

S =  \frac{1}{2}ab\sin \gamma = \frac{1}{2}bc\sin \alpha  = \frac{1}{2}ca\sin \beta.

(where α is the interior angle at A, β is the interior angle at B, and γ is the interior angle at C).

Furthermore, since sin α = sin (π - α) = sin (β + γ), and similarly for the other two angles:

S = \frac{1}{2}ab\sin (\alpha+\beta) = \frac{1}{2}bc\sin (\beta+\gamma) = \frac{1}{2}ca\sin (\gamma+\alpha).

Using coordinates

If vertex A is located at the origin (0, 0) of a Cartesian coordinate system and the coordinates of the other two vertices are given by B = (xB, yB) and C = (xC, yC), then the area S can be computed as ½ times the absolute value of the determinant

S=\frac{1}{2}\left|\det\begin{pmatrix}x_B & x_C \\ y_B & y_C \end{pmatrix}\right| = \frac{1}{2}|x_B y_C - x_C y_B|.

For three general vertices, the equation is:

S=\frac{1}{2} \left| \det\begin{pmatrix}x_A & x_B & x_C \\  y_A & y_B & y_C \\ 1 & 1 & 1\end{pmatrix} \right| = \frac{1}{2} \big| x_A y_C - x_A y_B + x_B y_A - x_B y_C + x!  _C y_B - x_C y_A \big|
S= \frac{1}{2} \big| (x_C - x_A) (y_B - y_A) - (x_B - x_A) (y_C - y_A) \big|.

In three dimensions, the area of a general triangle {A = (xA, yA, zA), B = (xB, yB, zB) and C = (xC, yC, zC)} is the Pythagorean sum of the areas of the respective projections on the three principal planes (i.e. x = 0, y = 0 and z = 0):

S=\frac{1}{2} \sqrt{ \left( \det\begin{pmatrix} x_A & x_B & x_C \\ y_A & y_B & y_C \\ 1 & 1 & 1 \end{pmatrix} \right)^2 + \left( \det\begin{pmatrix} y_A & y!  _B & y_C \\ z_A & z_B & z_C \\ 1 & 1 & 1 \end{pmatrix} \right)^2 + \left( \det\begin{pmatrix} z_A & z_B & z_C \\ x_A & x_B & x_C \\ 1 & 1 & 1 \end{pmatrix} \right)^2 }.

Using Heron's formula

The shape of the triangle is determined by the lengths of the sides alone. Therefore the area S also can be derived from the lengths of the sides. By Heron's formula:

S = \sqrt{s(s-a)(s-b)(s-c)}

where s = ½ (a + b + c) is the semiperimeter, or half of the triangle's perimeter.

Three equivale! nt ways of writing Heron's formula are

 S = \frac{1}{4} \sqrt{(a^2+b^2+c^2)^2-2(a^4+b^4+c^4)}
 S = \frac{1}{4} \sqrt{2(a^2b^2+a^2c^2+b^2c^2)-(a^4+b^4+c^4)}
 S = \frac{1}{4} \sqrt{(a+b-c) (a-b+c) (-a+b+c) (a+b+c)}.

Computing the sides and angles

In general, there are various accepted methods of calculating the length of a side or the size of an angle. Whilst certain methods may be suited to calculating values of a right-angled triangle, others ! may be required in more complex situations.

Trigonometric ratios in right triangles

A right triangle always includes a 90° (Ï€/2 radians) angle, here labeled C. Angles A and B may vary. Trigonometric functions specify the relationships among side lengths and interior angles of a right triangle.

In right triangles, the trigonometric ratios of sine, cosine and tangent can be used to find unknown angles and the lengths of unknown sides. The sides of the triangle are known as follows:

  • The hypotenuse is the side opposite the right ! angle, or defined as the longest side of a right-angled triangle, in this case h.
  • The opposite side is the side opposite to the angle we are interested in, in this case a.
  • The adjacent side is the side that is in contact with the angle we are interested in and the right angle, hence its name. In this case the adjacent side is b.

Sine, cosine and tangent

The sine of an angle is the ratio of the length of the opposite side to the length of the hypotenuse. In our case

\sin A = \frac {\textrm{opposite}} {\textrm{hypotenuse}} = \frac {a} {h}\,.

Note that this ratio does not depend on the particular right triangle chosen, as ! long as it contains the angle A, since all those triang! les are similar.

The cosine of an angle is the ratio of the length of the adjacent side to the length of the hypotenuse. In our case

\cos A = \frac {\textrm{adjacent}} {\textrm{hypotenuse}} = \frac {b} {h}\,.

The tangent of an angle is the ratio of the length of the opposite side to the length of the adjacent side. In our case

\tan A = \frac {\textrm{opposite}} {\textrm{adjacent}} = \frac {a} {b}\,.

The acronym "SOHCAHTOA" is a useful mnemonic! for these ratios.

Inverse functions

The inverse trigonometric functions can be used to calculate the internal angles for a right angled triangle with the length of any two sides.

Arcsin can be used to calculate an angle from the length of the opposite side and the length of the hypotenuse.

\theta = \arcsin \left( \frac{\text{opposite}}{\text{hypotenuse}} \right)

Arccos can be used to calculate an angle from the length of the adjacent side and the length of the hypontenuse.

\theta = \arccos \left( \frac{\text{adjacent}}{\text{hypotenuse}} \right)

Arctan can be used to calculate an angle from the length of the opposite side and the length of the adjacent side.

\theta = \arctan \left( \frac{\text{opposite}}{\text{adjacent}} \right)

The sine and cosine rules

A triangle with sides of length a, b and c and angles of α, β and γ respectively.

The law of sines, or sine rule[10], states that the ratio of the length of side a to the! sine of its corresponding angle α is eq ual to the ratio of the length of side b to the sine of its corresponding angle β.

\frac{a}{\sin \alpha} = \frac{b}{\sin \beta} = \frac{c}{\sin \gamma}

The law of cosines, or cosine rule, connects the length of an unknown side of a triangle to the length of the other sides and the angle opposite to the unknown side. As per the law:

For a triangle with length of sides a, b, c and angles of α, β, γ respectively, given two known lengths of a triangle a and b, and the angle between the two known sides γ (or the angle opposite to the unknown side c), to calculate the third side c, the following formula can be used:

c^2\ = a^2 + b^2 - 2ab\cos(\gamma) \implies b^2\ = a^2 + c^2 - 2ac\cos(\beta) \implies a^2\ = b^2 + c^2 - 2bc\cos(\alpha).

Non-planar triangles

A non-planar triangle is a triangle which is not contained in a (flat) plane. Examples of non-planar triangles in non-Euclidean geometries are spherical triangles in spherical geometry and hyperbolic triangles in hyperbolic geometry.

While the internal angles in planar triangles always add up to 180°, a hyperbolic triangle has angles that add up to less than 180°, and a spherical triangle has angles that add up to more than 180°. A hyperbolic triangle can be obtained by drawing on a negatively-curved surface, such as a saddle surface, and a spherical triangle can be obtained by drawing on a positively-curved surface such as a sphere. Thus, if one draws a giant triangle on the surface of the Earth, one will find that the sum of its angles is greater than 180°. It is possible! to draw a triangle on a sphere such that each of its internal angles is equal to 90°, adding up to a total of 270°.


facts about triangles