information packages

We view the world through relationships. That is, some information is connected or related to other information for some reason or another. These associations are how we navigate through our lives.
  • Dishes include ingredients.
  • Actors appear in movies.
  • Roads post speed limits.
  • People are issued social security numbers.
  • Kindergarteners like ice cream flavors.
  • Measurements are quoted in different units.
  • Authors write books.
  • Students earn course grades.
  • Mountains have heights.
  • Families are traced through trees.
  • Businesses are open during working hours.

All of these relationships are different and yet the same. Some relationships can be viewed as objects possessing characteristics. Some relationships can be viewed as if-then statements. Some relationships can be viewed as cause and effect. But they can all be viewed as two collections with associated elements.

Relations are just about the vaguest, thinnest structure any two sets could possibly share.

There are two sets and then some of their members are associated to one another.

In fact, this structure is so thin that we cannot do much with it. Fortunately, we don’t want to do much with relations. We are just laying the groundwork for richer structures. Right now, we just want to invent some language and notation, so that we can talk about these types of structures. We have a start already. The two sets of information in a relation have the names domain and codomain.

A Feeling of Direction

Because a relation might be encountered as an if-then statement or a cause-and-effect association, we have a natural directional feeling for the information.

The “if” part comes before the “then” part. The “cause” comes before the “effect”. We would like this feeling reflected in our relation structure, language, and notation.

The idea is for mathematics to describe how we view the world, so we give relations a characteristic of order. Therefore, relations come prepackaged with a feeling that the information is connected from the domain to the codomain.

  • You pick items from the domain and then you get items in the codomain.
  • Items from the domain cause items in the codomain.
  • Items in the codomain occur because of items in the domain.
  • Elements of the codomain happen at places in the domain.

A Feeling of Direction = An Order

A feeling of direction means that we feel something comes first and then something comes second. Something comes before and something comes after.

Of course, we have mathematical notation to reflect this structure.

  • Unordered: A collection of unorder items is called a “set”. We use curly braces to denote a set.

    These all represent the same set. The order that we list the items has no significance or mathematical meaning.

  • Ordered: In addition to the items in a collection, the order in which we list them might also have some significance. It this case, we use parentheses to signal that the ordering matters.

    These are all different:

This is useful for describing domains and codomains.

List Representations

Most of our communication is going to be written in this course, so we need some agreements on how we will represent relations in writing. We already have several ways of representing sets. The easiest way to communicate about sets is to just list the members inside curly braces and separate the items with commas.

domain = { Casablanca, Men in Black, The Godfather, Joker, Toy Story, King Richard }

codomain = { Marlon Brando, Will Smith, Humphrey Bogart, Joaquin Phoenix, Harrison Ford, Al Pacino }

Now we need a way to present the pairings. The traditional way is to write them as ordered pairs: the left (or first) item coming from the domain and the right (or second) item from the codomain. We can list these ordered pairs in a set of ordered pairs.

pairs = { (The Godfather, Marlon Brando), (Men in Black, Will Smith), (Casablanca, Humphrey Bogart), (Joker, Joaquin Phoenix), (King Richard, Will Smith), (The Godfather, Al Pacino) }

These three sets make up a relation.

Which item(s) from this codomain is(are) paired with the domain movie “King Richard”?

Marlon Brando Will Smith Humphrey Bogart Joaquin Phoenix Harrison Ford Al Pacino

Which item(s) from this domain is(are) paired with the codomain actor “Joaquin Phoenix”?

Casablanca Men in Black The Godfather Joker Toy Story King Richard

Of course, we could (and will) have many relations that use the same domain and codomain, but include different pairings. This could get confusing. Let’s help ourselves out by naming our relations. The name of the relation above will be Starring.

A relation is a package.

A relation is a package of three sets. The domain and codomain are sets of information. The third set is a set of pairs. Each pair connects a member of the domain with a memeber of the codomain.

There is a domain item written on the left and a codmain item written on the right. They are separated with a comma. All of that is wrapped in parentheses.

The order is important.

The ordered pair is in the relation. The ordered pair is not.

Table Representations

Lists are good representations of relations when the sets are not very big. However, the parentheses become difficult to browse through when there are a lot of them. Another representation for a relation comes in the form of a table. A table visually organizes the pairs much better.

Relations are tools. We use them to model structure we see in the real world. Once we have translated the real world information into a relation, then we leave the real world and enter the mathematical world. Inside the mathematical world, we investigate the relation to reveal information about the relation. Finally, we interpret this new information back out into the real world.

Questions

We have created some mathematical structure to address questions. From this structure, we can see that there are basically two kinds of questions.

  • [Type 1] You know the domain item and want the corresponding codomain partners.
  • [Type 2] You know the codomain item and want the corresponding domain partners.

That is basically all we ever do.

The descriptions of our relations will become more and more detailed, which will require some critical thinking to understand. Inside the mathematical world we may need some sophisticated tools to investigate the relation. But, in the end, all we are ever doing is hunting down domain information connected to recognized codomain information, or hunting down codomain information connected to meaningful domain information.

Too Much

Our examples, so far, have been small. What are we going to do when we want to examine a relation between something like movies and actors?

This table would have many rows. The Internet Movie Database lists over a million movies. There would be more than 37 rows just for Will Smith. There is no way we could visually sift through such a table for a question about Will Smith movies. (How would we even print the table to look at it?)

We need to narrow the scope of our investigation here, quickly. Otherwise, we will be buried in a mountain of data.

Our plan is to investigate only certain types of relations.

Narrowing Our Investigation

Our examples, so far, have been small. What are we going to do when we want to examine a relation between atoms and molecules? That list or table is going to be too big to look at with our eyes. How would we look through a table with billions of rows and find the ones holding carbon? The topic of all relations is just too big of an investigation. Let’s focus in on a particular type of relation.

Most of our questions really identify a single hypothesis (antecedent) and then expect a single associated conclusion (consequent).

This would translate into each domain member is always connected to a single codomain member.

Let’s focus our investigation to these types of relations. These types of relations are called functions.

ooooo-=-=-=-ooOoo-=-=-=-ooooo
more examples can be found by following this link
More Examples of Relations