Welcome, I don't know why you are here, but I will tell you what is this blog about so you don't waste any time looking around . This is a math blog, as you already know. Here I will expose math topics, from simple algebra, to calculus and all in between. My idea here is to make this interactive, depending on the feedback I get, so make sure to comment on the posts if you don't understand something or you want me to write about some particular subject, because my aim is to help people, not to show off all my knowledge or to shout out "cool" stuff. I know math can be boring to most people and I intend to write of the most general subjects seen in school, highschool and college in a way that anyone can understand. Here you will find some very basic stuff written in simple words, how to solve word problems, what is math, algebra, math in games, fractions, multiplication, division, math for kids, for adults, cool math, boring math, whatever I find interesting to discuss and whatever YOU want to see here, so I'm counting on you to make this interactive, let's make that happen.

17 may. 2013

Linear Functions

Linear functions.


Alright! now that we built the basis (defining functions and linear equations) we can talk about linear functions, don't mix that up with linear transformations, we will talk about that eventually. Now it will come to light why the word linear. At this point, it would be good if you get some graphing software, such as Matlab, Derive, Mathematica, Octave or even google. Some of them are free, some not, Matlab can get quite expensive depending on the license you buy. I will make a post about some of them, eventually, and for this one, I will use Derive, because it is the simplest one. We will see about that later.
How does a linear function look like? well, it is a function, so it has to relate two sets, and satisfy the condition that, for every element of the domain, there is one and only one corresponding element in the codomain.
y = mx +b  <-- this is the "face" of a linear function. Why m? why b? what is variable? what is fixed?
m and b are fixed numbers, what I wrote is the slope intercept form, we'll see about that name.
For now, m and b are fixed numbers, x and y are the variables. So, an example of a linear function is 
y=3x+2 or y=7.5x+8/4.
This is not the only face a linear function can have. You can have 
Ax+By = C <--- this is called the standard form
you can go from one to the other performing the same operations on both sides as we did in the linear equations post. Let's see how to go from the standard to the slope intercept
Ax+By = C  <---- we need to get y alone on the left side, so let's subtract Ax from both sides
By = -Ax +C  <--- now let's divide both sides by B
y = -A/Bx +C/B
so, m = -A/B and b = C/B.
Alright, that is how they can look like. They are equations, because there is an equal sign somewhere in there, and they are linear, because no variable is raised to no power (remember there is an implicit hidden power of 1, x^1= x ) and no variable is input of any weird function, such as cos(x) or e^x or Ln(x) or such. So, linear.
Ok, what we can do with these things? can we solve them? the answer is  no, we can't.
There are infinite pairs (x,y) that satisfy  y = x +4, think about it.
If x is 1, y is 5, so (1,5) is a possible solution, but if x is 2, y is 6, so (2,6) might as well be the solution. So hopefully you understand that it doesn't make any sense to say "solve y = x+4"
So, what can we do with these linear functions? graph them, solve for particular values of x OR y.
And that's pretty much it, so let's graph this. How can we do that?
Well, as we saw, there are infinte pairs that make that equation true, if we set a two dimesional space, where x is the horizontal coordinate and y is the vertical coordinate, the pair (1,5) determines a point in that plane, and so does (2,6) and (3,7) and they don't have to be integers, (1.5,5.5) also satisfies the equation. So let's graph all those points along with a couple more (that I get just by selecting random x's and seeing what y ends up being) and see what we get
.
This is something we can actually do with pen and paper, and hopefully you will see that if you join the points you get a straight line, now I'm not going to prove that, but I can show you a graph that I get form Derive if I input y=x+4

What Derive does is basically plot thousands of points, now we don't got time for that, and we are smart. If we have two points, we can draw a line, right? that is all we need, two points, a pen, paper and a ruler, more than two points is redundant, hopefully that makes sense.
And this is the reason that they are called linear, because the graph is a line.
Ok, there are a few more elements to discuss, and the reason why the slope intercept form is "better" than the standard (it is easier to do some things with the standard though)
First, what gives the name to the slope intercept form. Remember it was  y=mx+b
m is the slope, we will talk about that later
and b "is the intercept" Acutally, (0,b) is the y intercept, if you notice, at the y axis, x is 0 (because x is the shift with respect to the y-axis, positive to the right, negative to the left)
So, just by looking at it, we can tell the slope and we can tell the y-intercept (point of intersection of the line and the y axis).
The slope is the number with the x, and it makes sense to call it slope too.
Picture this scenario, we have  y = mx, no b (or b=0, however you want to see it)
there is a fixed point here,  (0,0) no matter what m is, if x is 0, y is 0.
So, say m is 1, y=x, we can get the point (1,1) and draw a line with that and (0,0)
but if m is 2? we get (1,2) instead, and if m=100, we get (1,100) let's see how that looks like.

the green is y=x, the purlpe y=2x and the brownish is y=100x
so, as the slope grows, the line gets steeper, and that is what we think about when we see the word slope, right? a big slope, a very steep thing, so if the slope is 100, it should be steep, compared to what? well, to a slope of 1, if the slope is small, say  0.0001 , then we should expect almost no slope,
if the slope is 0, we should have an horizontal line (that is what one imangines with "no slope" )
and if the slope is negative, the line "goes down" ( as x increases y decreases)
so a slope of -100 for example, would be very steep, but pointing down.
Hopefully all this makes sense, I hope to get some feedback. I will put a couple of problems, but we will come back to this, in a more practical sense. Let me know what you think in the comments.

1)  3x +2y  = 7   <---- what is the slope here?
2)  5y = 3+x <--- write this in the slope intercept form
3) 5x+7y = 11 <--- what is the y-intercept here?

Functions

 Functions.


Ok, today we are going to talk about functions. You have to be aware that this is a HUGE topic in math and here I only want to give a simple word definition on what functions are, so we can move on to linear functions, graphing and all that stuff. So a function, a function is, in simple words, a relation between two sets. You have set A (that could be a bucket of dirty socks) and set B (that could be a bucket of gloves), a function is a relation between the elements of those sets (for example, pair the sock with the glove of the same color). Now, there is a condition that a function must satisfy. All elements of the input set (the set you apply the function to) must have a corresponding element in the output set and ONLY ONE. That is why we make a difference bewteen the input set and the output set, and they are called Domain and Codomain (or Range) respectively. So you have to specify what sets you will use, and for a given relation, you can define the function with a pair of sets and not with another pair. 
Let's see real examples of this. Say set A ={1,2,3,4}  (the numbers 1,2,3 and 4) and set B={2,4,6,8}, so we define a relation, with A as the domain and B as the Codomain and the relation is as follows  f(a) = 2a. What does this mean? That for an input "a" (a is an element of A, i.e 1,2,3 or 4)
we get the outcome by multiplying it by 2. Now, is this relation a function? Well, we have to see if it satisfies the condition, does each element of A have a corresponding element in B? let's see,  
f(1) = 2*1 = 2 so, (1,2) is the ordered pair. (an orderer pair is what the words say, two things, in a particular order) Is 2 in B? yes, does 1 have any other corresponding element in B? no, if we multiply 2*1 we will get 2 and only 2. So far we have no problem, but we can't say it is a function yet, we have to see if this holds for 2,3 and 4. And it does, you can check that f(2) =4,  f(3) = 6 and f(4) = 8. All 4,6 and 8 are in B and for none of the a's (2,3 and 4) we have more than one corresponding element in B. So f(a)= 2a is a function if we use A={1,2,3,4} as the domain and B={2,4,6,8} as the codomain. What happens if we flip the roles? what if we want B to be the domain? Same relation
f(b) = 2b  ( we use b now because B is the domain, we could have used x in both cases, the a and b were to emphatize the domain). Well, it works for 2,  f(2) = 4 and the pair (2,4) with 2 in B and 4 in A is valid pair, because 4 is in A, but none of the others, f(4) = 8, 8 is not in A (and that is enough to prove it is not a fucntion, but let's see the rest)  f(6)= 12, 12 is not i n A, and  f(8) = 16, not in A.
Som the same relation, f(x) = 2x, is a function with domain A and codomain B, but it is NOT a function with domain B and codomain A. Let's see a couple of examples.
I will use X for the domain set and x for the domain's elemets and same with Y and y with the codomain.
X={1,2,3,4} ; Y={1,2,3,4}
f(x) =2
This relation (we can't call it function yet) relates all x's with the number 1. If we were to list the
ordered pairs, we would have (1,2), (2,2), (3,2) and (4,2). Is it a function? You may say no, because all elements of X have the same corresponding element in Y, you would have fallen in my trap (muahaha) the condition is that all elements of X have one and only one correspondinf element in Y. And that happens, all of them have one and only one, who cares if all have the same, there's no rule with that, there is also no rule that says there can't be unpaired elements in the Codomain. So this is indeed a function. Another example....
I will just give the orderer pairs here, same X and Y as before. I will use the notation "(x,f(x))" for the set of all the ordered pairs given by the relation.
"(x,f(x))" = {(1,1), (2,1), (2,2),(3,3),(4,4)}
Is this relation a function?? NO!! why? because 2 (the "x 2") has two corresponding elements, so not a function.
I will leave some problems for you to work, relations, you tell me if they are function or not, and if not, why? Leave your answers in the comments.

1)  X={1,2,3,4} and Y={2,3,4,5}
f(x) = x+1

2) X={1,2,3,4} and Y={2,3,4}
f(x) = x+1

3)  X={0,2,4,8} and Y={2,3,4,5} 
"(x,f(x))" = {(0,2),(2,3),(4,4)} 

4) X={1,2,3,4} and Y={2,3,4,5}
f(x) = 1







15 may. 2013

Linear equations

Linear equations.


Alright! we are going to talk about linear equations today. Why? Well, it is one of the most simple and basic concepts in math and it leads to many others, so it seems like a good place to start.
First of all, what is an equation? Well, the word kind of says it, equation, equ, equal, right? An equation is just two things that are equal to each other, like 5=3+2. That is an equation, it has a left side, 5, and a right side, 3+2. There's no mistery there.
Now, what is a linear equation? That is a little (not much) more complicated. A linear equation is an equation that has a variable, that can appear many times, but it is always raised to the power of 1, or what is the same, it has no exponents. Now, I said power of 1 and no exponents, that may sound like a contradiction, right? if it is raised to the power of 1 you may say, "hey! there is an exponent, it is 1" and you wouldn't be half wrong, but if we raise something to the power of 1, we get the same thing, like 10 for example, 10^1 is 10 to the power of 1 (the caret is the standard symbol for exponents) but that is just 10, any number or expression raised to the power of 1 is just itslef.
So, writing no exponent is the same as writing exponent 1.
Ok, enough with that. Let's see how a linear equation looks like.
5x = 2x +1  <---- that is a linear equation right there, x is the variable, and since it has no exponent (or an implicit exponent of 1) it is linear.
5x^2 = 2x+1 <--- this is NOT a linear equation, why? well, there is an x with exponent of 2, that's why. There may be other things, like cos(x) or e^x that do have the x's with no exponents, but they are "inside" functions, so those don't count as linear either.
And what do we do with this so called "linear equations"? well, we solve them. And what is solving a linear equation? getting x's value, get x = "a number". Once we did that, we can say the equation is solved, people tend to say "solve for x" in cases like this.
How do we solve a linear equation? well, we have an equation, that is, two things that are equal to each other, like twin brothers. If you do something to one of them (like cut one of the brother's arm off) they will no longer be equal, but if you do the same to both (cut the other's arm also) they will remain equal.
So, that is the idea, a little less bloody than the twin parallelism though. We do the same on both sides, whatever we want, but the same thing.
So, let's solve the one in the example
5x=2x +1  <---- we want to solve this for x, so we should get all the x terms on one side and group them. Say we choose the left side to be the "x side", then we need to get the 2x out of the right side.
What can we do to make that happen? Well, let's look at what 2x is doing to the rest of the side, the
rest of the side is just +1, and 2x is clearly added to it, so to make it dissapear, we subtract 2x from both sides, let's do that and see what happens.
5x -2x = 2x +1 -2x <---- we have 2x and -2x on the right side, that is just 0 (if that doesn't make sense
think on 2 dollars -2 dollars, people tend to get smarter when they think about money)
So the right side is just  1 since 1+0 =1, we can say that the 2x's cancelled (in an addition/subtraction sense).
So we have
5x -2x = 1  <--- now we need to group on the left side, we have 5x -2x, that is 3x (again, think about
money if it doesn't make sense, 5 bucks -2 bucks)
So we have
3x =1
Now, we didn't solve for x yet, the goal was to get x= "a number" but we have 3x, and that is 3 times x, we never write the multiplication sign (that is an asterisk *  in standard writing) because it is (or should be) understood that it is a multiplication. So, in the same train of thoughts, we have to do the opposite operation to cancel it, opposite of multiplication is division, so we divide both sides by 3
3x /3  =  1/3
the  3's cancell on the left (in a multiplication/division sense)
so we have left just x, then
x= 1/3
And that is how we solve linear equations.
Now I would like to talk about that "cancelling" idea, because there are (for now) two different kinds
of cancelling, the addition/subtraction sense and the multiplication/division sense.
Why they are different? well, think of this, we have a 5 and we do stuff to it, stuff that cancels.
So, we add 3 to it and subtract 3 after that. We get  5+3-3 and we can do that in any order
(5+3) -3 = 8-3 = 5
5 +(3-3) = 5+0 = 5
or even  (5-3) +3  = 2 +3 = 5
the second one is the one I care about, that is where we can see the cancelling, 3-3 = 0
and if we add 0 to 5 it is still 5, so when two numbers cancel in an addition/subtraction sense, they cancel to 0.
However, that is not the case in mulitplication/division. Let's use the same number, we start with 5, multiply it and divide it by 3, we can do it in any order too.
(5*3)/3 =  15/3 = 5
5*(3/3) =  5*1 = 5
but it is the second one where we can see the cancelling in a mulitplication/division sense.
3/3 = 1,  and if we mulitply a number by 1 (same way if we add 0 to a number) we don't change it.
So, in this case they cancel, yes, but not to 0, they cancel to 1.
I hope this was helpful for all you people struggling with this, remember that "Sucking at something is the first step to becoming sorta good at something" - Jake the dog.
 One thing I didn't mention, but it's worth doing, the variable doesn't have to be just one, we can extend this concept to many variables, for example
y = 2x +3z +40w
that is a linear equation too, we have to careful with the exponent idea here, every variable adds to the exponent in a term, say we have  xy as one of the terms. both x and y have no exponent (equivalent to exponent 1) but as a whole the term "has exponent 2" so that is non linear also.
Ok, quizz time, you have to tell if the equations are or aren't linear, and if not, why? leave the answers in the comment section. When possible, solve the equations.

1)  3x +2 = 20
2)  3x^2+2 = 20
3)  3x+2x+3x+1= 2x+20
4)  y= 2x+3
5)  cos(x) = 12x+15
6)  e^x = 2y
7)  1/x = x+y
8)  xy= 3z