Is there a definition for free and bound variables in logic? That makes me crazy to think about it because my book and other pages on the web talks about free and bound variables without any definition. 
I think everything in mathematics has a definition so there must be a definition for it.
Also, I am taking a course called abstract mathematics talks about how to proof and logic. I am curious about if logic and these proof study have another name in mathematics.
 A: Free and bound variables are defined in the context of the syntax of first-order logic, considering terms (i.e. "names" for objects) and formuals (i.e. statements).
The formal definition of the set $\text {FV}(φ)$ of free variables of a formula $φ$ is defined by :

all the variables occurring in a term or atomic formula are free.
$\text {FV}(¬φ) = \text {FV}(φ)$;
$\text {FV}(φ ∨ ψ) = \text {FV}(φ) \cup \text {FV}(ψ)$, (and the same for the other binary connectives);
$\text {FV}(∀xφ) = \text {FV}(∃xφ) = \text {FV}(φ) \setminus \{ x \}$.

A variable that is not free is bound.
A formula $φ$ is called closed if $\text {FV}(φ)=\emptyset$.
In formula $\forall x P(x)$, the variable $x$ is bound.
In formula $\forall x R(x,y)$ the variable $x$ is bound while the variable $y$ is free.

A closed formula, when interpreted, expresses a sentence, i.e. has a definite tuth value.
$\forall n (n \ge 0)$ is true in $\mathbb N$, while $\exists n (n < 0)$ is false in it.
What is the truth value of a formula with a free variable, like e.g. $(x > 0)$ ?
It depends... It depends on the value we assign to the variable $x$.
A free variable acts as a pronoun of natural language : its reference must be identified according to the context : if I say "it is red", the truth vale of the statement depends on the object I'm pointing at with my finger : the red book  or the blue pen on my table.
In the same way, there are ways (defined by the formal semantical specifications of the first-order language : see variable assignment function) to give "temporary" reference to free variables of a formula.
Consider the formula :

$x+2=5$;

if we substitute to $x$ the (name for the) number $3$, we obtain a true sentence (i.e. $3+2=5$).
If instead we substitute to $x$ the (name for the) number $4$, we obtain a false sentence (i.e. $4+2=5$).
A formula with free var is called "open" because it has no (fixed) meaning : it is "open to" different interpretations; in order to give it meaning, we have to transform it into a sentence (i.e. a closed formula).
A: Unfortunately variables are really fiddly.
The problem of variables comes up a lot in computer science with respect to theories like the lambda calculus which neatly handles binding and substitution. If you permit a framework of multisorted higher order logic you can axiomize and define quantifiers in terms of the Simply Typed Lambda Calculus. A quantifier over a domain of discourse can be directly given a type of
$\text{join} \colon (\text{domain} \rightarrow \text{prop}) \rightarrow \text{prop}$.
Such a foundation of Simple Type Theory is used in practice in theorem provers like Isabelle/HOL. Look into The seven virtues of simple type theory for a bit more info.
The STLC doesn't directly solve variable binding but it does provide a nice example to formalize and generalize from. One of the simpler techniques for dealing away with the ugliness of variables and capture avoiding substitution which is often used in practice in metatheory is the use of de Bruijn indices. Basically variables are handled as numbers indexing are indexing into the local scope and so for example the constant function $\lambda x y. x$ becomes $\lambda. \lambda. 1$. If you are interested in this sort of stuff there's a nice blog post on binders by Jesper Cockx.
If you are not happy with this sort of approach you can compile down the STLC to Cartesian closed categories. See Compiling to Categories by Conal Elliott. BCKW is probably a more traditional sets of combinators to compile down to. Unfortunately the full category theory treatment of dependent types and quantifiers in terms of slices and subobjects is pretty eldritch. I think really one of the only areas a combinatorial approach is used in practice is the class comprehension metatheorem of NBG set theory where formulas for classes are compiled down to permutations of tuples and such.
More direct approaches to dealing with variables are the area of Algebraic Logic. You probably want to look into Alfred Tarski's Cylindrical Algebras where basically you can treat existential quantifiers as a sort of modal operator. There are also other approaches to the problem such as polyadic algebras but I don't understand them as well.
Lastly I feel like I ought to mention Hilbert's indefinite description operator which arguably makes some problems with variables worse by interleaving propositions and terms but can simplify metatheory. $\varepsilon x. P(x)$ is used to describe "an indefinite term such that P is true." Existential quantification can then be defined as $\exists x. P(x) \equiv P(\varepsilon x. P(x))$.
You don't mention the issue but in addition to free and bound variables there are also the problems of global and local definitions and definitorial expansion. In some cases you can desugar local definitions to lambda expressions $\textbf{let} \, x := e \, \textbf{in} \, e' \equiv (\lambda x. e) e'$ although for technical reasons highly specific to computer programs this doesn't always work. The most succinct method of dealing with global variables might be to abuse a definite description operator.
Also this isn't really a problem for first order logic but computer science needs to deal with control flow/continuations as another kind of variable. However, focusing as in the lambda bar mu mu-tilde calculus is nondeterministic.
I hope I have convinced you it is possible if not actual that someone has formalized capture avoiding substitution of variables correctly and that if you are a Cylon you can Schonfinkle everything to an unreadable mess free of name binders. Unfortunately variables are really fiddly.
