Monday, 2 July 2018

Linear Regression - Part(2) [Matrix Calculus]

Previously, I had posted part(1) of the linear regression, where we dealt with machine learning perspective.  And, I had promised to present it with other angles of Mathematics too and here I am!
In this article, we would see it with matrix calculus.

The link to previous article is given below.
http://avidsuraj.blogspot.com/2018/05/linear-algebra-part1-machine-learning.html

I have used the same notation used in the previous article.  So, readers are recommended to read the previous article or at least notation portion of it.

The cost function or error function is written as:
$$ J = \sum  _{i=1}^{m} {{{e}^{(i)}}^{2}}$$
where, ${e}^{(i)}$ is the error for ${i}^{th}$ training example.

Let $E$ represent matrix of all the errors.  So, it is given by:
$$ E = Y-{Y}_{pred} \\
E = Y-(XW+C) \\
E = Y-XW-C $$
Differentiation of a vector, Y with respect to a vector X


Tuesday, 29 May 2018

Linear Regression - Part(1) [Machine Learning Perspective]

Motivation:

Suppose we want to predict the rent price of a room.  Prediction requires some features or variables on the basis of which we are going to predict.  We think for a while and maybe the rooms which are near to the road cost more.  Similarly, the rooms which have shutters in them are expensive as such rooms are valuable from the commercial perspective.  We also see that big rooms cost more than smaller rooms.  And more and more...

We want to take a handful of those features and based on them, make some prediction regarding rent price.  How could we do it?  How could we model it?  One of the techniques in modeling such rent price model is linear regression and we will discuss it here.

Sunday, 11 March 2018

Visualization Challenge on Simple Linear Algebra Problem

A $n \times n$ matrix multiplies with $n$ dimensional column vector to produce another $n$ dimensional column vector.  Here, we do the visualization of multiplication of matrix and vector to produce another vector and then see how many combinations of either vector or matrix are possible.

Dimensionally, it is given as:
$$[n\times n]\times [n \times 1]=[n \times 1]$$

The task of visualization is:
Suppose you multiply $n\times n$ matrix with $n$ dimensional column vector to produce another column vector which obviously has $n$ dimensions.
If your two vectors are known, you would have infinite number of choices for the matrix.  But if the matrix and second vector were given, you would have just one choice for the first vector if any.
Try to visualize it and convince to yourself geometrically.

Now, I would show how I did the visualization and convinced myself.*

Multiplication of $n \times n$ matrix with $n$ dimensional column vector is finding linear combination of column vectors of the matrix where the linear coefficients are given by components of the left hand side column vector.  The linear combination of those matrix column vectors would give the column vector of the right hand side.

If two vectors are given, we would have fixed linear coefficients and fixed second column vector.  That means we should choose the matrix column vectors in such a way that their linear combination, given the linear coefficients, would produce the right hand side column vector.  If we take two dimensional space and then try to visualize, it can be easily intuited.  Given a vector(of RHS), we can produce it from infinite number of combinations of two other vectors (with linear coefficients given) if we can see it by taking parallelogram law of vector addition.  Given two points as opposite edges of parallelogram, there are infinite number of ways the other two opposite points can be located to form a parallelogram.

If the matrix and second vector are given to us, let's see how we can visualize to convince ourselves that there is only one vector choice if any.  The problem translates to finding the linear coefficients such that the linear combination of the given matrix vectors would give right hand side column vector.  The linear combination of given $n$ dimensional column vectors giving given $n$ dimensional column vector has only one set of linear coefficients.  This is because each set of weights when used in doing linear combination of matrix column vectors, would give each unique vector.  So, there can be only one combination if any of the linear coefficients.  So, the vector can be only one.  It  can be 0 if the matrix column vectors are not independent.

*Also liked to add that the way people do visualization and have intuition differs from individual to individual.  This is my attempt to explain how I did the visualization.  Convincing to yourself about why something is true matters the most than how you convinced in my opinion.  Have fun!

Thursday, 1 March 2018

How Does ReLU Function Give Non-linearity?

Rectified Linear Unit(ReLU) function is one of the activation functions used massively in neural networks.  ReLU function and its variants have gained massive popularity and use in the pools of other activation functions like sigmoid, tanh, etc because of its advantages over other activation functions which we would discuss in another separate article.

ReLU function is defined as:
$$ ReLU(x)=\begin{cases} x\quad if\quad x>0 \\ 0\quad if\quad x\le 0 \end{cases} $$

Its graph is drawn as:


Sigmoid function in its structure has curved shape but ReLU function lacks the curved structure that sigmoid function has.  So, it is normal to wonder and question ReLU's implementation on how does it achieve non-linearity.  I will try here to give intuition on it.

The first intuition you can get is by looking at the shape of ReLU function above.  Linear function forms the lines, straight lines.  But the ReLU function is not straight line rather a piecewise function that looks broken at the value of x equal to 0.  That gives little intuition on its non-linearity.

Let's delve into it further now.  Suppose there is the data that has input and output distribution which can be modeled with absolute value function.  We employ neural network into it and then use ReLU as activation.  The training of the model selects the biases and variables in such a way that the neural network mimics absolute value function.

I would take two-layers neural network and would manually choose value of weights and biases such that the neural network mimics absolute value function.  I have one input(x) and one output(y) and in the single hidden layer, I have two nodes.  So, the neural network model becomes:


The value of output(y) then becomes:
$$ y=max({ w }_{ 1 }^{ [2] }max\left( { w }_{ 1 }^{ [1] }x+{ b }_{ 1 },0 \right) +{ w }_{ 2 }^{ [2] }max\left( { w }_{ 2 }^{ [1] }x+{ b }_{ 1 },0 \right) +{ b }_{ 2 },0) $$

I put manually the weights as:
$$ { w }_{ 1 }^{ [2] }={ w }_{ 2 }^{ [2] }=1,\quad { w }_{ 1 }^{ [1] }=1,{ w }_{ 2 }^{ [1] }=-1,\quad { b }_{ 1 }=0,{ b }_{ 2 }=0 $$

So, the equation becomes:
$$ y=max(max\left( x,0 \right) +max\left( -x,0 \right) ,0) $$

For $ x \ge 0 $, we have:
$$ y=max(max\left( x,0 \right) +max\left( -x,0 \right) ,0)\\ y=max(x,0)=x $$

And, for $x<0$, we get:
$$ y=max(max\left( x,0 \right) +max\left( -x,0 \right) ,0)\\ y=max(-x,0)\\ y=-x $$

We got the definition of the overall neural network as absolute value function.  Hence, it is proved that the parameters I gave modeled the neural network as absolute value function.

Using custom parameters, I am able to model absolute value function by using the neural network.  Accordingly, we can model more complex function by using the bigger neural network with appropriate parameters.
Hopefully, I gave you more intuition here about non-linearity of ReLU integrated networks.

Now, let's try to do model classification algorithm by using non-linearity property of ReLU functions.  Suppose the points inside a unit circle are of one class and that outside the unit circle are of another class.  Let's see if we can model the boundary using ReLU activations.

Let 0 represent the class when the point is inside the circle and 1 represent the class when the point is outside the circle.  I would try to approximate the circle boundary using four straight lines which we would show being formed by a ReLU activated neural network.

The exact boundary and approximated boundary are shown below.

Now, let's try to model approximate boundary using the neural network here.
Let me remind that the points inside boundary are represented by 0 and the points outside the circle are represented by 1.

I choose the network in such a way that it approximates the boundary and the classification model.

Here, I have four nodes in the hidden layer, two inputs, x and y, and then an output classifying 0 or 1.

The output(O) can be constructed as:
$$ O=(max(x+y-1,0)+max(-x+y-1,0)+max(-x-y-1,0)+max(x-y-1))>0 $$

We would find O from x and y using the neural network now with final output layer being a relational operator.

The neural network is constructed as shown in the figure below.



This neural network constructed above does the classification of the specified problem taking the approximated boundary.  The more nodes we make in the hidden layer, the more close the approximated boundary is to the exact boundary.  So, to construct the complex boundary we employ the higher number of neurons.  But there is always the chance of overfitting to the training set so we should build the model along with testing in the validation set.

Hopefully, I gave some intuition on non-linearity property of ReLU activations.  Any feedback, suggestions, and comments are highly welcomed.  I hope to bring more and more of the articles in the coming days relating to machine learning, artificial intelligence, mathematics and computer science.

Thank you.

Tuesday, 23 January 2018

Sigmoid Function and Softmax Function, Are They Related?

Sigmoid function is an activation function that gives value in the range of 0 to 1.  Values very much less than 0 gives activation value close to 0 and values very much greater than 0 gives activation value close to 1.
It can be expressed mathematically as:
$$ \sigma (x) = \cfrac {1} {1+{e}^{-x}}$$

Sigmoid function is used as the final activation function when we need to find if something is True.  It gives the probability that something is True or False as the truth we define.  For example, if we are to find if the given picture is cat, we may use sigmoid function as the final activating function.  But if we are to do multi-class problem, shall we use sigmoid function for all the classes or is there any other function?

Softmax function is widely used for multi-class classification problem.  But how does it compare with sigmoid function applied to all the classes?

Block diagram of logistic regression


It turns out that having sigmoid function for all the classes is same as having softmax function. It does not matter which activation function we would use.  We would be doing same thing.  Training using either of the functions is mathematically identical.  Let's see it how for single-class classification problem.

We employ sigmoid function giving result the probability of some picture being a cat.  That can be said as the two class classification problem having labels as:
1) Being a cat
2) Not being a cat

So, using sigmoid function as final activation function, we would get equivalent two-classes final activation as:
$$ \left( {a}_{1} \quad {a}_{2}\right)=\left( \cfrac {1} {1 + {e}^{-{z}_{1}}} \quad \cfrac {{e}^{-{z}_{1}}} {1+{e}^{-{z}_{1}}} \right)\quad \dots \quad (1)$$
Note that we got ${a}_{2}$ by subtracting ${a}_{1}$ from $1$.

That is same as applying sigmoid function on each classes output.  In that case we would get:
$$ \left( { a }_{ 1 }\quad { a }_{ 2 } \right) =\left( \cfrac { 1 }{ 1+{ e }^{ -{ z }_{ 1 } } } \quad \cfrac { 1 }{ 1+{ e }^{ -{ z }_{ 2 } } }  \right)  $$

Equating the value of ${a}_{2}$ and simplifying, we would get:
$$ {z}_{1}=-{z}_{2}\quad\dots\quad(2)$$

Putting $(2)$ into $(1)$,
$$\left( {a}_{1} \quad {a}_{2}\right)=\left( \cfrac {1} {1 + {e}^{-{z}_{1}}} \quad \cfrac {{e}^{{z}_{2}}} {1+{e}^{{z}_{2}}} \right)$$

Now, multiplying ${a}_{1}$ by ${e}^{\frac{{z}_1} {2}}$ and ${a}_{2}$ by ${e}^{-\frac{{z}_2} {2}}$ in both numerator and denominator, we would have:
$$\left( {a}_{1} \quad {a}_{2}\right)=\left( \cfrac {{e}^{\frac{{z}_1} {2}}} {{e}^{\frac{{z}_1} {2}} + {e}^{\frac{-{z}_{1}} {2}}} \quad \cfrac {{e}^{\frac{{z}_{2}}{2}}} {{e}^{-\frac{{z}_{2}}{2}}+{e}^{\frac{{z}_{2}}{2}}} \right)\quad\dots\quad(3)$$

Using $(2)$ in $(3)$,
$$\left( {a}_{1} \quad {a}_{2}\right)=\left( \cfrac {{e}^{\frac{{z}_1} {2}}} {{e}^{\frac{{z}_1} {2}} + {e}^{\frac{{z}_{2}} {2}}} \quad \cfrac {{e}^{\frac{{z}_{2}}{2}}} {{e}^{\frac{{z}_{1}}{2}}+{e}^{\frac{{z}_{2}}{2}}} \right)\quad\dots\quad(3)$$

$(3)$ is same as using final activation as softmax function where the $z$ values are $\frac{{z}_{1}}{2}$ and $\frac{{z}_{2}}{2}$.  It is no different than using softmax function on the $z$ values ${z}_{1}$ and ${z}_{2}$ as the two methods differ in just scaling of $z$ values.

So, training using sigmoid function for single class classification as final activation function is just a case for training using softmax function using two classes.  We can see the same true for more than two classes classification cases too.

Monday, 4 July 2016

Secret to Solving the Square Puzzle

During my childhood days, I was very much interested in math tricks though I didn't learn much of them.  One of the puzzle that I got to know is square puzzle where numbers from certain range are arranged in such a way that the sum of every rows and columns would be same.  Also, the sum of numbers in both the diagonals would also be the same.  I learned one method to solve such puzzle(probably from my father) but what bugged me was another solution done by XYZ which was different from what I had learned.  I tried to learn how XYZ did that solution but could not.  I even asked XYZ how s/he would do it, but s/he never taught the trick.  Failed after my few attempts, I didn't try and eventually forgot that thing.

This puzzle came up again when I was browsing Quora.  I was looking a thread of Mathematics trick and happened to see the trick.  With all excitement, I crammed that technique and was delighted.  That very technique is today's recipe.  However, it only applies to odd-numbered-boxes squares.

Monday, 27 June 2016

Four Pauses

  1. The shivering cold has long since gone.  I am still to take off my jackets.  The heat has already started to generate in my body.  I feel every cells carrying exothermic reactions inside me.  I am starting to feel cooked.  Oh, please, no scorching sun now!  No!  No!
  2. The dazzling reflection coming from the papers have teared me, not as a result of emotions but as a result of biological response.  I can't open my eyes, neither can I flush the beam.  With corrugated eyebrow, I close my eyes as hard as I could, as quickly as I could.
  3. The lines I get to write sporadically when the sun fades are not still to find some rhythm.  Rhythm lies in reader, argues one.  Rhythm is a must thing to writer, I insist. 
  4. Each breath creates a freshness in me as my breath resonates with flowing air.  The nitrogen dominated air, though odorless, is pleasant and fresh on its own right; though colorless, colorful on its own reflections; though tasteless, delicious on its own flavor.

Saturday, 25 June 2016

Cosine Cup, an Untalked Mathematical Surface and Its Area

Everyone must have seen and used umbrella once in their lifetime.  In the rainy days, umbrella is a must-have thing while going somewhere.  Monsoon has already started in Nepal and many villagers have already started sowing rice seeds.  However, very few people wonder about the structure and shape of the umbrella.  Looks like the truncate of sphere, umbrella is beautiful in its own structure and design, thanks to different colors and designs that makes it beautiful as a lotus flower.

Now, I would like you to wonder one thing.
Have you ever heard of cosine cup?



Most probably, not.  Even before I came up with this term, I hadn't listened.  I was doing some mathematics on surfaces obtained by revolving things about some axis and this thing, cosine cup, a surface of revolution came up.  There may even be umbrella designed on this shape.  Who knows?!


Saturday, 4 June 2016

Mathematical Analysis of Tower of Hanoi Problem

Tower of Hanoi is a mathematical puzzle invented by French Mathematician Édouard Lucas in 1883.  There is a story about it being associated with Indian temple named Kashi Viswanath temple about which you can read here.

Now, let's jump into the problem.

Picture source: Wikipedia

There are three rods as shown in the figure above.  One of the rods has the discs arranged in the order of their size.  The discs are arranged upwards in the decreasing-size manner.  Our job is to shift whole set of discs to any other rod following the following rules.

  • Only one disc can be moved at a time.
  • Never can a larger disc sit above smaller disc.
  • Only uppermost disc can be moved from the set of discs.
Complying to these rules, we should shift the whole set of discs from first rod to any other rod.  There can be any number of discs.  Our task is to come for general solution for any 'n' number of discs.


Tuesday, 31 May 2016

Secret to Happiness


This article is my Quora answer to the question "How can I be happy every day?"  



Following these three rules makes me happy every time, not just every day. They are just my subjective thoughts.
  1. Stop over-thinking: Most people are unhappy as a result of over thinking. People over-think about their career, others career, future and so on. Thinking should be done at moderate level . We can’t plan and frame everything about our life at once. Life should be lived on its flow. Trying to go and plan everything of future is likely to disturb your tranquility.

  2. Live your life at present: What I have seen most unhappy people do is time traveling. They time travel past and future now and again. Just live your present moment. Forget about past. Stop worrying about future. Just think about what you have at present. Count every moments and respect it, enjoy it. Happiness is in the present moment.
  3. Enjoy small things: The secret to happiness is enjoying small things. I had read on Quora, Harsha Bhogle saying, big things don’t come often; so we need to learn to enjoy small things. Counting on those small moments is going to stop making you unhappy. Even it adds on our productivity. Dhoni breaks down the chase method.
All those three points may seem to mean same thing. Going in depth, they all mean same but expressing in three points, as I have done above, may help to get what I am trying to state.
Let talk taking real life examples.
  • People tend to think more when they are approaching pressure situations like examinations. Make plans on how are you going to handle the situation and work on those plans. Make sure the plans don’t get disturbed or changed. Sticking to the made plans is the most important thing you need to do. Execute the plans one by one. Don’t overdo, don’t under do.
  • People think about their future very much. Where I may go in future, what may happen to my life in future, am I going to achieve my dreams or not, what if s/he surpasses me, what if I fail, etc are the questions that haunt us again and again. FORGET ALL THAT. Worrying is not going to change anything. It is only making your efficiency decrease in present. Just stop thinking about future.
  • Some people can’t forget their past and the past haunts again and again. We can’t go in the past and rectify our mistakes. It is worthless worrying and repenting about what wrong we have done in our past. Do the things like apologizing, minimizing the damage of the past mistake, learning the lesson and not repeating the mistake.
  • While doing something, don’t do keeping some expectation from them or having framework of how something would be. The preconceived picture about a situation, event or anything is going to hurt us if preconceived picture does not come out to be real. Just be empty minded.
  • You are sitting in your room alone. Instead of being sad of how your friends dumped you or how no one is there by your side, enjoy the rumbling sound the fan is making. Enjoy the rays of sun the window is reflecting. Just be the observer and enjoy little things at the present.
Happy, happy !

Friday, 18 March 2016

30-seconds Vedic Method to Square a Number

One of the perks of knowing Mathematical tricks is you get to tell the answer before someone takes calculator out.  Squaring of two digit number is what we(especially people related to STEM field) encounter commonly.  I am going to tell a trick regarding squaring of 2-digits number which is from Vedic Mathematics.

Courtesy: Indiatoday

Wednesday, 3 February 2016

Optimization Using Lagrange Multipliers

Optimization is selecting the best in the given situation.  Calculus can be used in optimising many problems like selection of least material to manufacture something or selection of the method that costs least to manufacture.  Optimization involving single variable is simple and done by finding critical points, boundary points and discontinuous or nondifferentiable points.  In the same way problems involving two or more variables can also be optimized.  It is done by putting some given condition in the function which we are going to optimise and find points that were said in case of single variable optimization.  But in case of multivariable functions we equal all first order partial derivatives to zero.

We are doing here an optimization problem but not by conventional method we used to do in single variable optimization.  We are using another method called Lagrange multipliers.  This process of optimization may make optimization process easier in some of the cases.  So it is useful method of optimization to know.

Monday, 25 January 2016

Load Shedding Equation

As of 24th January, 2016, Kathmandu is facing about 12 hours of loadshedding daily.  Nepal Electricity Authority, a governmental organization that is responsible for distribution and control of electricity all over Nepal publishes loadshedding routine in its site regularly.  Loadshedding routine is updated based on the power shortage.  This time I have attempted to formulate load shedding equation.  Though it does not provide full information about load shedding, it says when line comes in the evening.  Line in the evening is taken of great importance as children watch cartoons at this time, mothers, sisters watch serials, fathers, brothers watch news and interviews relating politics and so on.  So I have attempted to formulate load shedding equation that gives information when lines comes in the evening.

Before going furthur I want readers to make sure they know concepts about floor and ceiling function.  I am making use of floor function here.  Readers are also expected to know how partial derivatives work.

As of now Kathmandu is divided into seven groups(Group 1 to Group 7).  The load shedding schedule varies with load shedding group and day of the week.  Group number is represented by 'G' here.  Each day of the week is also represented by number.  The nth day of the week is represented by the number 'n'.  For example: Sunday it is represented by 1, Monday it is represented by 2 and so on.
Let another variable 'd' represent difference between the loadshedding group number(G) and week number(n).

Tuesday, 10 November 2015

Beautiful Existence

With thou flowing me,
Source: lightworkersworld.com
every wavering breadth bounces in me.
With eternity of the life,
every glow in life perimeters thou.

These perennial moments I hope last forever.
As the incessant glowing of an candle.
Bright and warm effulgent light,
Spreading the reason I live.
Holding the hope I do.
Dam of my emotions and absorbent of my commotions.
Ecstatic I am.

Saturday, 17 October 2015

Why Normally Poisson Ratio Can't Exceed 0.5?

Poisson's Ratio and its significance:

Poisson's ratio, named after Simeon Poisson, is the ratio of transverse strain to longitudinal strain. It measures the tendency how deformation of one dimension affects another. Suppose if we stretch rubber band the length of the rubber band increases but the thickness/width decreases. This effect of one dimension deformation on another dimension is showed by Poisson's ratio.

Credit: ntu.edu

Monday, 12 October 2015

Angelina Post-Breakup Trauma and Her Resilience

Angelina never thought how the happily flowing days could turn this harsh. Nor had she thought how the flowers of happiness could turn into thorny miseries. Seeing those ecstasy turn into grief she cursed life and God. The passionate lover of God was changed into atheist. God is only a joke for her now. She tore all the pictures of Hindu Gods of her room. She threw away all those idols of Gods. Those idols which were made of metals were sold to street metal refineries. Her life was crying hard and she didn't have any hope of being happy.

Sunday, 27 September 2015

Life As Trees Higher Manifestation

The branches are celebrating utter enjoyment by drifting with the wind. The utmost need for them is to enjoy the freedom and the present moment. High intensity wind may swerve their dancing direction but moment afterwards it happens to be merely an innocuous blow. They accept every blows and thunders even if they have deleterious effects. All these multi-branched trees have congregated here in this jungle and lived happily.



Wednesday, 16 September 2015

The Moon and the River

Source: Google Images
1.     How beautiful is that smile? 
     As if blossomed as the lotus! 
     How cheerful is that face?
     As if seen the secrets of heaven!
     How serene is that standing?
     As if perfected equanimity!


     I am trying to get hold of you. I have seen you appearing in multitude of forms. Be it the pond where you stand quiet and still so deep. Be it window where you reflect your being. Though indefatigable quest for your being and physical existence you have always been going away from me. Though I wish to surmount you in my control, in my way you are insurmountable, unsoakable. You neither go away from me nor come onto me, you just stand over me as if guarding me, as if enticing me, as if outpouring me. I feel sometimes I have been safeguarded by invincible and infadable beauty but you only hover on my top disregarding what I want, what I feel. Little did I know you were not an angel; you are just pretty full moon hovering in the utterly beautiful sky.

Saturday, 15 August 2015

Good Bye

From: couplestraininginstitute.com
So few are the words,
so sweet the voice.
So eccentric the opinions,
so natural the choice.

Digging from the inner core,
Day by day, more and more,
Fill the wholes pore by pore,
Starts now conscious snore.

Tuesday, 4 August 2015

Mathematics and Motivation with a Compound Case

Have a glimpse:

Many of you might have seen this picture. Whether through internet or magazines, books, etc., it has gained fair amount of popularity. It is really a fascinating picture, an erotic picture for the mathematical guys. James Altucher once termed this picture as weird mathematics in his article. This fascinating picture has some significance too. This picture is often seen in the inspirational articles. While giving motivation people like to use it very much.


Significance:

More often than not it is interpreted as follows:

If you improve yourself everyday by 1% of what you are today you will end up improving by 37.78 times by the end of a year.

Likewise, if you degrade everyday by 1% of what you are today you will end up degrading by 39.21(1/0.0255) times by the end of a year.

[Note: To be precise it is 0.0255, 0.03 is an only approximation. As I am analyzing it mathematically I am taking more precise value than the market value. Taking 0.03 will make error in my calculation and shows result contrary to elementary mathematical laws.]

It is interesting to note here that although your increase and degrade rates are same, final degrading ratio is more than increasing ratio at the end of a year. I will give you a hint on why this happens and you could work out its reason.

Hint: If you increase 4 by 1, you end up increasing by 20% and if you decrease 4 by 1 you will end up decreasing by 25%. Now it is on your hand to find out the reason for the above interesting finding.


Is it true (mathematically)?


In our first case, rate of improvement is 1% and n is 365 days i.e. R=1 and n=365.

Is it practically possible?

What do you think about its practical feasibility? Mathematically we proved it. Increasing by 1% is not a big deal, isn’t it? It is just a percent. We feel we can do it. Then can we increase ourselves by 37.78 times in a year? To be honest we cannot. Really we cannot. Let’s see how the condition can be visualized.

At first let’s see it in a graph.


Though we may feel the rise is like linear but actually the rise is exponential.  The graph shows that. Even we can reduce our equation to exponential equation as shown in equation (1). And it is known fact that improving exponentially is impossible. Therefore the first condition is not practically feasible. Those inspirational speakers were only being philosophical while mentioning first expression ;). They used it to inspire you, to make you optimistic. But what they said is not practically possible. We even can’t go little near to this equation.

Nevertheless the second expression is true. Absolutely true!
Its equation is:
Let’s see it graphically.



You can degrade exponentially. Cost can depreciate exponentially. Radioactive decomposition occurs exponentially. Those speakers and writers have used second equation to suggest you be alert. They are absolutely right in second equation. You never know how you are ripping into. 

You might have remembered this famous quote by Warren Buffet, “It takes 20 years to build a reputation and five minutes to ruin it.”


Other similar cases in Mathematics:

I would like to call it as a compound case. In many places they have their use like compound population, compound interest, compound depreciation, etc. They are all exponential equations.
For an example:


In compound depreciation everything is same except the constant c being <1.
The function becomes increasing or decreasing function depending upon the value of c (whether it is greater than 1 or smaller than 1 respectively). If c = o the function is a constant function as c = 0 comes from rate of increase ‘R’ being zero.

Thank you very much. I will bring more and more mathematics stuffs in coming articles.