Jump to content
  • Advertisement
  • entries
  • comments
  • views

Mathematical functions

Sign in to follow this  


A function is similar to a relation. It is a set of ordered pairs (a, b) where a is an element of some set A and b is an element of some set B. For each element in A, there is exactly one ordered pair with that element in the first position. Given such a function f, we say that it is a function from A to B, which is written f:A->B. We could also say that f:A->B is a mapping from A to B, in which case we would say that f maps from A into B. This is written b = f(a), similar to how a relation is written aRb. a is mapped into b by f, and we say that b is the image of a under f.

Something worth noting is that because there is exactly one ordered pair per element in A, there is exactly one image of each element in A under f. In other words, an element of A has exactly one image, no more, no less. However, multiple elements of A can share the same image. If each image is the image of only a single element of A, we say that f is one-to-one. If all the elements of B are images of elements in A under f, we say that the function f maps from A onto B, rather than "into".

A composition of two functions f:A->B and g:B->C is the function fog:A->C which maps from A into C. Such a function is written c = g(f(a)) where a is an element of A and c is an element of C. This works exactly how you think it would: First b = f(a) is calculated, and the resulting element b is fed into g.

And lastly we have something called a "permutation". A permutation is a function f:A->A where A is not the empty set and f is both one-to-one and maps from A onto A. What you end up with is a function which rearranges the elements in A.

Reposted from http://invisiblegdev.blogspot.com/
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!