Find all School-related info fast with the new School-Specific MBA Forum

 It is currently 04 Sep 2015, 00:31

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# Events & Promotions

###### Events & Promotions in June
Open Detailed Calendar

# Inequalities trick

Author Message
TAGS:
Current Student
Status: Nothing comes easy: neither do I want.
Joined: 12 Oct 2009
Posts: 2798
Location: Malaysia
Concentration: Technology, Entrepreneurship
Schools: ISB '15 (M)
GMAT 1: 670 Q49 V31
GMAT 2: 710 Q50 V35
Followers: 201

Kudos [?]: 1220 [60] , given: 235

Inequalities trick [#permalink]  16 Mar 2010, 09:11
60
KUDOS
130
This post was
BOOKMARKED
I learnt this trick while I was in school and yesterday while solving one question I recalled.
Its good if you guys use it 1-2 times to get used to it.

Suppose you have the inequality

f(x) = (x-a)(x-b)(x-c)(x-d) < 0

Just arrange them in order as shown in the picture and draw curve starting from + from right.

now if f(x) < 0 consider curve having "-" inside and if f(x) > 0 consider curve having "+" and combined solution will be the final solution. I m sure I have recalled it fully but if you guys find any issue on that do let me know, this is very helpful.

Don't forget to arrange then in ascending order from left to right. a<b<c<d

So for f(x) < 0 consider "-" curves and the ans is : (a < x < b) , (c < x < d)
and for f(x) > 0 consider "+" curves and the ans is : (x < a), (b < x < c) , (d < x)

If f(x) has three factors then the graph will have - + - +
If f(x) has four factors then the graph will have + - + - +

If you can not figure out how and why, just remember it.
Try to analyze that the function will have number of roots = number of factors and every time the graph will touch the x axis.

For the highest factor d if x>d then the whole f(x) > 0 and after every interval of the roots the signs will change alternatively.
Attachments

1.jpg [ 6.73 KiB | Viewed 31594 times ]

_________________

Fight for your dreams :For all those who fear from Verbal- lets give it a fight

Money Saved is the Money Earned

Jo Bole So Nihaal , Sat Shri Akaal

GMAT Club Premium Membership - big benefits and savings

Gmat test review :
670-to-710-a-long-journey-without-destination-still-happy-141642.html

Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 5870
Location: Pune, India
Followers: 1485

Kudos [?]: 8007 [48] , given: 190

Re: Inequalities trick [#permalink]  22 Oct 2010, 05:33
48
KUDOS
Expert's post
43
This post was
BOOKMARKED
Yes, this is a neat little way to work with inequalities where factors are multiplied or divided. And, it has a solid reasoning behind it which I will just explain.

If (x-a)(x-b)(x-c)(x-d) < 0, we can draw the points a, b, c and d on the number line.
e.g. Given (x+2)(x-1)(x-7)(x-4) < 0, draw the points -2, 1, 7 and 4 on the number line as shown.

Attachment:

doc.jpg [ 7.9 KiB | Viewed 30856 times ]

This divides the number line into 5 regions. Values of x in right most region will always give you positive value of the expression. The reason for this is that if x > 7, all factors above will be positive.

When you jump to the next region between x = 4 and x = 7, value of x here give you negative value for the entire expression because now, (x - 7) will be negative since x < 7 in this region. All other factors are still positive.

When you jump to the next region on the left between x = 1 and x = 4, expression will be positive again because now two factors (x - 7) and (x - 4) are negative, but negative x negative is positive... and so on till you reach the leftmost section.

Since we are looking for values of x where the expression is < 0, here the solution will be -2 < x < 1 or 4< x < 7

It should be obvious that it will also work in cases where factors are divided.
e.g. (x - a)(x - b)/(x - c)(x - d) < 0
(x + 2)(x - 1)/(x -4)(x - 7) < 0 will have exactly the same solution as above.

Note: If, rather than < or > sign, you have <= or >=, in division, the solution will differ slightly. I will leave it for you to figure out why and how. Feel free to get back to me if you want to confirm your conclusion.
_________________

Karishma
Veritas Prep | GMAT Instructor
My Blog

Get started with Veritas Prep GMAT On Demand for $199 Veritas Prep Reviews Math Forum Moderator Joined: 20 Dec 2010 Posts: 2027 Followers: 142 Kudos [?]: 1219 [16] , given: 376 Re: Inequalities trick [#permalink] 11 Mar 2011, 05:49 16 This post received KUDOS 7 This post was BOOKMARKED vjsharma25 wrote: VeritasPrepKarishma wrote: vjsharma25 wrote: How you have decided on the first sign of the graph?Why it is -ve if it has three factors and +ve when four factors? Check out my post above for explanation. I understand the concept but not the starting point of the graph.How you decide about the graph to be a sine or cosine waveform?Meaning graph starts from the +ve Y-axis for four values and starts from -ve Y-axis for three values. What if the equation you mentioned is (x+2)(x-1)(x-7)<0,will the last two ranges be excluded or the graph will also change? I always struggle with this as well!!! There is a trick Bunuel suggested; (x+2)(x-1)(x-7) < 0 Here the roots are; -2,1,7 Arrange them in ascending order; -2,1,7; These are three points where the wave will alternate. The ranges are; x<-2 -2<x<1 1<x<7 x>7 Take a big value of x; say 1000; you see the inequality will be positive for that. (1000+2)(1000-1)(1000-7) is +ve. Thus the last range(x>7) is on the positive side. Graph is +ve after 7. Between 1 and 7-> -ve between -2 and 1-> +ve Before -2 -> -ve Since the inequality has the less than sign; consider only the -ve side of the graph; 1<x<7 or x<-2 is the complete range of x that satisfies the inequality. _________________ Manager Joined: 29 Sep 2008 Posts: 150 Followers: 3 Kudos [?]: 53 [10] , given: 1 Re: Inequalities trick [#permalink] 22 Oct 2010, 10:45 10 This post received KUDOS 8 This post was BOOKMARKED if = sign is included with < then <= will be there in solution like for (x+2)(x-1)(x-7)(x-4) <=0 the solution will be -2 <= x <= 1 or 4<= x <= 7 in case when factors are divided then the numerator will contain = sign like for (x + 2)(x - 1)/(x -4)(x - 7) < =0 the solution will be -2 <= x <= 1 or 4< x < 7 we cant make 4<=x<=7 as it will make the solution infinite correct me if i am wrong Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 5870 Location: Pune, India Followers: 1485 Kudos [?]: 8007 [6] , given: 190 Re: Inequalities trick [#permalink] 11 Mar 2011, 18:57 6 This post received KUDOS Expert's post vjsharma25 wrote: I understand the concept but not the starting point of the graph.How you decide about the graph to be a sine or cosine waveform?Meaning graph starts from the +ve Y-axis for four values and starts from -ve Y-axis for three values. What if the equation you mentioned is (x+2)(x-1)(x-7)<0,will the last two ranges be excluded or the graph will also change? Ok, look at this expression inequality: (x+2)(x-1)(x-7) < 0 Can I say the left hand side expression will always be positive for values greater than 7? (x+2) will be positive, (x - 1) will be positive and (x-7) will also be positive... so in the rightmost regions i.e. x > 7, all three factors will be positive. The expression will be positive when x > 7, it will be negative when 1 < x < 7, positive when -2 , x < 1 and negative when x < -2. We need the region where the expression is less than 0 i.e. negative. So either 1 < x < 7 or x < -2. Now let me add another factor: (x+8)(x+2)(x-1)(x-7) Can I still say that the entire expression is positive in the rightmost region i.e. x>7 because each one of the four factors is positive? Yes. So basically, your rightmost region is always positive. You go from there and assign + and - signs to the regions. Your starting point is the rightmost region. Note: Make sure that the factors are of the form (ax - b), not (b - ax)... e.g. (x+2)(x-1)(7 - x)<0 Convert this to: (x+2)(x-1)(x-7)>0 (Multiply both sides by '-1') Now solve in the usual way. Assign '+' to the rightmost region and then alternate with '-' Since you are looking for positive value of the expression, every region where you put a '+' will be the region where the expression will be greater than 0. _________________ Karishma Veritas Prep | GMAT Instructor My Blog Get started with Veritas Prep GMAT On Demand for$199

Veritas Prep Reviews

Manager
Status: On...
Joined: 16 Jan 2011
Posts: 189
Followers: 3

Kudos [?]: 46 [5] , given: 62

Re: Inequalities trick [#permalink]  10 Aug 2011, 16:01
5
KUDOS
7
This post was
BOOKMARKED
WoW - This is a cool thread with so many thing on inequalities....I have compiled it together with some of my own ideas...It should help.

1) CORE CONCEPT
@gurpreetsingh -
Suppose you have the inequality

f(x) = (x-a)(x-b)(x-c)(x-d) < 0

Arrange the NUMBERS in ascending order from left to right. a<b<c<d
Draw curve starting from + from right.

now if f(x) < 0 consider curve having "-" inside and if f(x) > 0 consider curve having "+" and combined solution will be the final solution. I m sure I have recalled it fully but if you guys find any issue on that do let me know, this is very helpful.

So for f(x) < 0 consider "-" curves and the ans is : (a < x < b) , (c < x < d)
and for f(x) > 0 consider "+" curves and the ans is : (x < a), (b < x < c) , (d < x)

If f(x) has three factors then the graph will have - + - +
If f(x) has four factors then the graph will have + - + - +

If you can not figure out how and why, just remember it.
Try to analyze that the function will have number of roots = number of factors and every time the graph will touch the x axis.

For the highest factor d if x>d then the whole f(x) > 0 and after every interval of the roots the signs will change alternatively.

Note: Make sure that the factors are of the form (ax - b), not (b - ax)...

example -
(x+2)(x-1)(7 - x)<0

Convert this to: (x+2)(x-1)(x-7)>0 (Multiply both sides by '-1')
Now solve in the usual way. Assign '+' to the rightmost region and then alternate with '-'
Since you are looking for positive value of the expression, every region where you put a '+' will be the region where the expression will be greater than 0.

2) Variation - ODD/EVEN POWER
@ulm/Karishma -
if we have even powers like (x-a)^2(x-b)
we don't need to change a sign when jump over "a".
This will be same as (x-b)

We can ignore squares BUT SHOULD consider ODD powers
example -
2.a
(x-a)^3(x-b)<0 is the same as (x-a)(x-b) <0
2.b
(x - a)(x - b)/(x - c)(x - d) < 0 ==> (x - a)(x - b)(x-c)^-1(x-d)^-1 <0
is the same as (x - a)(x - b)(x - c)(x - d) < 0

3) Variation <= in FRACTION
@mrinal2100 -
if = sign is included with < then <= will be there in solution
like for (x+2)(x-1)(x-7)(x-4) <=0 the solution will be -2 <= x <= 1 or 4<= x <= 7

BUT if it is a fraction the denominator in the solution will not have = SIGN

example -
3.a
(x + 2)(x - 1)/(x -4)(x - 7) < =0
the solution will be -2 <= x <= 1 or 4< x < 7
we cant make 4<=x<=7 as it will make the solution infinite

4) Variation - ROOTS
@Karishma -
As for roots, you have to keep in mind that given $$\sqrt{x}$$, x cannot be negative.

$$\sqrt{x}$$ < 10
implies 0 < $$\sqrt{x}$$ < 10
Squaring, 0 < x < 100
Root questions are specific. You have to be careful. If you have a particular question in mind, send it.

Refer - inequalities-and-roots-118619.html#p959939
Some more useful tips for ROOTS....I am too lazy to consolidate

<5> THESIS -
@gmat1220 -
Once algebra teacher told me - signs alternate between the roots. I said whatever and now I know why Watching this article is a stroll down the memory lane.

I will save this future references....

Anyone wants to add ABSOLUTE VALUES....That will be a value add to this post

_________________

Labor cost for typing this post >= Labor cost for pushing the Kudos Button
kudos-what-are-they-and-why-we-have-them-94812.html

Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 5870
Location: Pune, India
Followers: 1485

Kudos [?]: 8007 [3] , given: 190

Re: Inequalities trick [#permalink]  09 Sep 2013, 22:35
3
KUDOS
Expert's post
1
This post was
BOOKMARKED
karannanda wrote:
gurpreetsingh wrote:
I learnt this trick while I was in school and yesterday while solving one question I recalled.
Its good if you guys use it 1-2 times to get used to it.

Suppose you have the inequality

f(x) = (x-a)(x-b)(x-c)(x-d) < 0

Just arrange them in order as shown in the picture and draw curve starting from + from right.

now if f(x) < 0 consider curve having "-" inside and if f(x) > 0 consider curve having "+" and combined solution will be the final solution. I m sure I have recalled it fully but if you guys find any issue on that do let me know, this is very helpful.

Don't forget to arrange then in ascending order from left to right. a<b<c<d

So for f(x) < 0 consider "-" curves and the ans is : (a < x < b) , (c < x < d)
and for f(x) > 0 consider "+" curves and the ans is : (x < a), (b < x < c) , (d < x)

If f(x) has three factors then the graph will have - + - +
If f(x) has four factors then the graph will have + - + - +

If you can not figure out how and why, just remember it.
Try to analyze that the function will have number of roots = number of factors and every time the graph will touch the x axis.

For the highest factor d if x>d then the whole f(x) > 0 and after every interval of the roots the signs will change alternatively.

Hi Gurpreet,
Thanks for the wonderful method.
I am trying to understand it so that i can apply it in tests.
Can you help me in applying this method to the below expression to find range of x.
x^3 – 4x^5 < 0?

I am getting the roots as -1/2, 0, 1/2 and when i plot them using this method, putting + in the rightmost region, I am not getting correct result. Not sure where i am going wrong. Can you pls help.

Before you apply the method, ensure that the factors are of the form (x - a)(x - b) etc

$$x^3 - 4x^5 < 0$$

$$x^3 ( 1 - 4x^2) < 0$$

$$x^3(1 - 2x) (1 + 2x) < 0$$

$$4x^3(x - 1/2)(x + 1/2) > 0$$ (Notice the flipped sign. We multiplied both sides by -1 to convert 1/2 - x to x - 1/2)

Now the transition points are 0, -1/2 and 1/2 so put + in the rightmost region.
The solution will be x > 1/2 or -1/2 < x< 0.

Check out these posts discussing such complications:
http://www.veritasprep.com/blog/2012/06 ... e-factors/
http://www.veritasprep.com/blog/2012/07 ... ns-part-i/
http://www.veritasprep.com/blog/2012/07 ... s-part-ii/
_________________

Karishma
Veritas Prep | GMAT Instructor
My Blog

Get started with Veritas Prep GMAT On Demand for $199 Veritas Prep Reviews e-GMAT Representative Joined: 04 Jan 2015 Posts: 338 Followers: 66 Kudos [?]: 483 [3] , given: 83 Inequalities trick [#permalink] 06 Jan 2015, 02:35 3 This post received KUDOS Expert's post 8 This post was BOOKMARKED Just came across this useful discussion. VeritasPrepKarishma has given a very lucid explanation of how this “wavy line” method works. I have noticed that there is still a little scope to take this discussion further. So here are my two cents on it. I would like to highlight an important special case in the application of the Wavy Line Method When there are multiple instances of the same root: Try to solve the following inequality using the Wavy Line Method: $$(x-1)^2(x-2)(x-3)(x-4)^3 < 0$$ To know how you did, compare your wavy line with the correct one below. Did you notice how this inequality differs from all the examples above? Notice that two of the four terms had an integral power greater than 1. How to draw the wavy line for such expressions? Let me directly show you how the wavy line would look and then later on the rule behind drawing it. Attachment: File comment: Observe how the wave bounces back at x = 1. bounce.png [ 10.4 KiB | Viewed 2819 times ] Notice that the curve bounced down at the point x = 1. (At every other root, including x = 4 whose power was 3, it was simply passing through them.) Can you figure out why the wavy line looks like this for this particular inequality? (Hint: The wavy line for the inequality $$(x-1)^{38}(x-2)^{57}(x-3)^{15}(x-4)^{27} < 0$$ Is also the same as above) Come on! Give it a try. If you got it right, you’ll see that there are essentially only two rules while drawing a wavy line. (Remember, we’ll refer the region above the number line as positive region and the region below the number line as negative region.) How to draw the wavy line? 1. How to start: Start from the top right most portion. Be ready to alternate (or not alternate) the region of the wave based on how many times a point is root to the given expression. 2. How to alternate: In the given expression, if the power of a term is odd, then the wave simply passes through the corresponding point (root) into the other region (to –ve region if the wave is currently in the positive region and to the +ve region if the wave is currently in the negative region). However, if the power of a term is even, then the wave bounces back into the same region. Now look back at the above expression and analyze your wavy line. Were you (intuitively) using the above mentioned rules while drawing your wavy line? Solution Once you get your wavy line right, solving an inequality becomes very easy. For instance, for the above inequality, since we need to look for the space where the above expression would be less than zero, look for the areas in the wavy line where the curve is below the number line. So the correct solution set would simply be {3 < x < 4} U {{x < 2} – {1}} In words, it is the Union of two regions region1 between x = 3 and x = 4 and region2 which is x < 2, excluding the point x = 1. Food for Thought Now, try to answer the following questions: 1. Why did we exclude the point x = 1 from the solution set of the last example? (Easy Question) 2. Why do the above mentioned rules (especially rule #2) work? What is/are the principle(s) working behind the curtains? Foot Note: Although the post is meant to deal with inequality expressions containing multiple roots, the above rules to draw the wavy line are generic and are applicable in all cases. - Krishna _________________ Last edited by EgmatQuantExpert on 10 Jan 2015, 20:41, edited 1 time in total. Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 5870 Location: Pune, India Followers: 1485 Kudos [?]: 8007 [2] , given: 190 Re: Inequalities trick [#permalink] 23 Jul 2012, 02:13 2 This post received KUDOS Expert's post Stiv wrote: VeritasPrepKarishma wrote: mrinal2100: Kudos to you for excellent thinking! Correct me if I'm wrong. If the lower part of the equation$$\frac {(x+2)(x-1)}{(x-4)(x-7)}$$ were $$4\leq x \leq 7$$, than the lower part would be equal to zero,thus making it impossible to calculate the whole equation. x cannot be equal to 4 or 7 because if x = 4 or x = 7, the denominator will be 0 and the expression will not be defined. _________________ Karishma Veritas Prep | GMAT Instructor My Blog Get started with Veritas Prep GMAT On Demand for$199

Veritas Prep Reviews

Current Student
Status: Nothing comes easy: neither do I want.
Joined: 12 Oct 2009
Posts: 2798
Location: Malaysia
Concentration: Technology, Entrepreneurship
Schools: ISB '15 (M)
GMAT 1: 670 Q49 V31
GMAT 2: 710 Q50 V35
Followers: 201

Kudos [?]: 1220 [1] , given: 235

Re: Inequalities trick [#permalink]  19 Mar 2010, 11:59
1
KUDOS
ttks10 wrote:
Can u plz explainn the backgoround of this & then the explanation.

Thanks

i m sorry i dont have any background for it, you just re-read it again and try to implement whenever you get such question and I will help you out in any issue.

sidhu4u wrote:
I have applied this trick and it seemed to be quite useful.

Nice to hear this....good luck.
_________________

Fight for your dreams :For all those who fear from Verbal- lets give it a fight

Money Saved is the Money Earned

Jo Bole So Nihaal , Sat Shri Akaal

GMAT Club Premium Membership - big benefits and savings

Gmat test review :
670-to-710-a-long-journey-without-destination-still-happy-141642.html

Math Forum Moderator
Joined: 20 Dec 2010
Posts: 2027
Followers: 142

Kudos [?]: 1219 [1] , given: 376

Re: Inequalities trick [#permalink]  26 May 2011, 19:55
1
KUDOS
chethanjs wrote:
mrinal2100 wrote:
if = sign is included with < then <= will be there in solution
like for (x+2)(x-1)(x-7)(x-4) <=0 the solution will be -2 <= x <= 1 or 4<= x <= 7

in case when factors are divided then the numerator will contain = sign

like for (x + 2)(x - 1)/(x -4)(x - 7) < =0
the solution will be -2 <= x <= 1 or 4< x < 7
we cant make 4<=x<=7 as it will make the solution infinite

correct me if i am wrong

Can you please tell me why the solution gets infinite for 4<=x<=7 ?

Thanks.

(x -4)(x - 7) is in denominator.
Making x=4 or 7 would make the denominator 0 and the entire function undefined.

Thus, the range of x can't be either 4 or 7.
4<=x<=7 would be wrong.
4<x<7 is correct because now we removed "=" sign.
_________________
Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 5870
Location: Pune, India
Followers: 1485

Kudos [?]: 8007 [1] , given: 190

Re: Inequalities trick [#permalink]  08 Aug 2011, 10:59
1
KUDOS
Expert's post
1
This post was
BOOKMARKED
Asher wrote:
gurpreetsingh wrote:
ulm wrote:
if we have smth like (x-a)^2(x-b)
we don't need to change a sign when jump over "a".

yes even powers wont contribute to the inequality sign. But be wary of the root value of x=a

This way of solving inequalities actually makes it soo much easier. Thanks gurpreetsingh and karishma

However, i am confused about how to solve inequalities such as: (x-a)^2(x-b) and also ones with root value.

When you have (x-a)^2(x-b) < 0, the squared term is ignored because it is always positive and hence doesn't affect the sign of the entire left side. For the left hand side to be negative i.e. < 0, (x - b) should be negative i.e. x - b < 0 or x < b.

Similarly for (x-a)^2(x-b) > 0, x > b

As for roots, you have to keep in mind that given $$\sqrt{x}$$, x cannot be negative.

$$\sqrt{x}$$ < 10
implies 0 < $$\sqrt{x}$$ < 10
Squaring, 0 < x < 100
Root questions are specific. You have to be careful. If you have a particular question in mind, send it.
_________________

Karishma
Veritas Prep | GMAT Instructor
My Blog

Get started with Veritas Prep GMAT On Demand for $199 Veritas Prep Reviews Senior Manager Joined: 16 Feb 2012 Posts: 255 Concentration: Finance, Economics Followers: 5 Kudos [?]: 136 [1] , given: 121 Re: Inequalities trick [#permalink] 22 Jul 2012, 02:03 1 This post received KUDOS VeritasPrepKarishma wrote: mrinal2100: Kudos to you for excellent thinking! Correct me if I'm wrong. If the lower part of the equation$$\frac {(x+2)(x-1)}{(x-4)(x-7)}$$ were $$4\leq x \leq 7$$, than the lower part would be equal to zero,thus making it impossible to calculate the whole equation. _________________ Kudos if you like the post! Failing to plan is planning to fail. Current Student Status: Nothing comes easy: neither do I want. Joined: 12 Oct 2009 Posts: 2798 Location: Malaysia Concentration: Technology, Entrepreneurship Schools: ISB '15 (M) GMAT 1: 670 Q49 V31 GMAT 2: 710 Q50 V35 Followers: 201 Kudos [?]: 1220 [1] , given: 235 Re: Inequalities trick [#permalink] 18 Oct 2012, 04:17 1 This post received KUDOS 1 This post was BOOKMARKED GMATBaumgartner wrote: gurpreetsingh wrote: ulm wrote: in addition: if we have smth like (x-a)^2(x-b) we don't need to change a sign when jump over "a". yes even powers wont contribute to the inequality sign. But be wary of the root value of x=a Hi Gurpreet, Could you elaborate what exactly you meant here in highlighted text ? Even I have a doubt as to how this can be applied for powers of the same term . like the example mentioned in the post above. If the powers are even then the inequality won't be affected. eg if u have to find the range of values of x satisfying (x-a)^2 *(x-b)(x-c) >0 just use (x-b)*(x-c) >0 because x-a raised to the power 2 will not affect the inequality sign. But just make sure x=a is taken care off , as it would make the inequality zero. _________________ Fight for your dreams :For all those who fear from Verbal- lets give it a fight Money Saved is the Money Earned Jo Bole So Nihaal , Sat Shri Akaal Support GMAT Club by putting a GMAT Club badge on your blog/Facebook GMAT Club Premium Membership - big benefits and savings Gmat test review : 670-to-710-a-long-journey-without-destination-still-happy-141642.html Veritas Prep GMAT Instructor Joined: 16 Oct 2010 Posts: 5870 Location: Pune, India Followers: 1485 Kudos [?]: 8007 [1] , given: 190 Re: Inequalities trick [#permalink] 18 Oct 2012, 09:27 1 This post received KUDOS Expert's post GMATBaumgartner wrote: Hi Gurpreet, Could you elaborate what exactly you meant here in highlighted text ? Even I have a doubt as to how this can be applied for powers of the same term . like the example mentioned in the post above. In addition, you can check out this post: http://www.veritasprep.com/blog/2012/07 ... s-part-ii/ I have discussed how to handle powers in it. _________________ Karishma Veritas Prep | GMAT Instructor My Blog Get started with Veritas Prep GMAT On Demand for$199

Veritas Prep Reviews

Math Expert
Joined: 02 Sep 2009
Posts: 29209
Followers: 4751

Kudos [?]: 50309 [1] , given: 7544

Re: Inequalities trick [#permalink]  02 Dec 2012, 06:25
1
KUDOS
Expert's post
1
This post was
BOOKMARKED
GMATGURU1 wrote:
Going ahead in this inequalities area of GMAT, can some one has the problem numbers of inequalities in OG 11 and OG 12?

Cheers,
Danny

Search for hundreds of question with solutions by tags: viewforumtags.php

DS questions on inequalities: search.php?search_id=tag&tag_id=184
PS questions on inequalities: search.php?search_id=tag&tag_id=189
Hardest DS inequality questions with detailed solutions: inequality-and-absolute-value-questions-from-my-collection-86939.html

Hope it helps.
_________________
Current Student
Status: Nothing comes easy: neither do I want.
Joined: 12 Oct 2009
Posts: 2798
Location: Malaysia
Concentration: Technology, Entrepreneurship
Schools: ISB '15 (M)
GMAT 1: 670 Q49 V31
GMAT 2: 710 Q50 V35
Followers: 201

Kudos [?]: 1220 [1] , given: 235

Re: Inequalities trick [#permalink]  20 Dec 2012, 20:04
1
KUDOS
VeritasPrepKarishma wrote:
The entire concept is based on positive/negative factors which means <0 or >0 is a must. If the question is not in this format, you need to bring it to this format by taking the constant to the left hand side.

e.g.
(x + 2)(x + 3) < 2
x^2 + 5x + 6 - 2 < 0
x^2 + 5x + 4 < 0
(x+4)(x+1) < 0

Now use the concept.

Yes this is probable but it might not be possible always to group them. So in case you are unsure just follow the number plugging approach. But most of the times this trick would be very handy.
_________________

Fight for your dreams :For all those who fear from Verbal- lets give it a fight

Money Saved is the Money Earned

Jo Bole So Nihaal , Sat Shri Akaal

GMAT Club Premium Membership - big benefits and savings

Gmat test review :
670-to-710-a-long-journey-without-destination-still-happy-141642.html

Math Expert
Joined: 02 Sep 2009
Posts: 29209
Followers: 4751

Kudos [?]: 50309 [1] , given: 7544

Re: Inequalities trick [#permalink]  11 Nov 2013, 06:51
1
KUDOS
Expert's post
Can you please explain the above mentioned concept in relation to the following question?
Is a > O?
(1) a^3 - 0 < 0
(2) 1- a^2 > 0

Can you please explain the scenario when (x-a)(x-B)(x-C)(x-d)>0?
Sorry, but finding it difficult to understand.

Check alternative solutions here: is-a-0-1-a-3-a-0-2-1-a-86749.html

Hope this helps.
_________________
Veritas Prep GMAT Instructor
Joined: 16 Oct 2010
Posts: 5870
Location: Pune, India
Followers: 1485

Kudos [?]: 8007 [1] , given: 190

Re: Inequalities trick [#permalink]  23 Apr 2014, 03:43
1
KUDOS
Expert's post
1
This post was
BOOKMARKED
PathFinder007 wrote:

I have a query. I have following question

x^3 - 4x^5 < 0

I can define this as (1+2x).x^3(1-2x). now I have roots -1/2, 0, 1/2. so in case of >1/2 I will always get inequality value as <0 and in case of -1/2 and 0 I will get value as 0.

So How I will define them in graph and what range I will consider for this inequality.

Thanks

The factors must be of the form (x - a)(x - b) .... etc

x^3 - 4x^5 < 0
x^3 * (1 - 4x^2) < 0
x^3 * (1 - 2x) * (1 + 2x) < 0
x^3 * (2x - 1) * (2x + 1) > 0 (Note the sign flip because 1-2x was changed to 2x - 1)
x^3 * 2(x - 1/2) *2(x + 1/2) > 0

So transition points are 0, 1/2 and -1/2.

____________ - 1/2 _____ 0 ______1/2 _________

This is what it looks like on the number line.
The rightmost region is positive. We want the positive regions in the inequality.

So the desired range of x is given by x > 1/2 or -1/2 < x< 0

For more on this method, check these posts:

http://www.veritasprep.com/blog/2012/06 ... e-factors/
http://www.veritasprep.com/blog/2012/07 ... ns-part-i/
http://www.veritasprep.com/blog/2012/07 ... s-part-ii/

The links will give you the theory behind this method in detail.
_________________

Karishma
Veritas Prep | GMAT Instructor
My Blog

Get started with Veritas Prep GMAT On Demand for \$199

Veritas Prep Reviews

Intern
Joined: 24 Sep 2013
Posts: 12
Followers: 0

Kudos [?]: 2 [1] , given: 56

Re: Inequalities trick [#permalink]  11 Nov 2014, 08:52
1
KUDOS
For statement I

(1) (1-2x)(1+x)<0

Once you get this into the req form

2 (x-1/2) (x+1) > 0

sol +++++ -1 ------ 1/2 +++++
As Karishma pointed out ponce in the req form, the rightmost will always be positive and the alternating will happen from there.

So sol for this x> 1/2 and x<-1

Integers greater than 1/2 and less than -1 , thus |x| may be >= 1. Unsure

Thus Insufficient.

For Statement II

(2) (1-x)(1+2x)<0

Once you get this into the req form

2(x+1/2) (x-1) > 0

sol +++++ -1/2 ------ 1 +++++

So sol for this x>1 and x< -1/2

Integers greater than 1 and less than -1/2 , thus |x| may be >= 1. Unsure

Thus Insufficient.

Combining Both the statements

x<-1 and x>1

Thus Integers for this range will give |x| > 1

Thus Sufficient.

Hope this helps. I am not very confident of my solution though. Its my first solution gmatclub

mayankpant wrote:
gurpreetsingh wrote:
I learnt this trick while I was in school and yesterday while solving one question I recalled.
Its good if you guys use it 1-2 times to get used to it.

Suppose you have the inequality

f(x) = (x-a)(x-b)(x-c)(x-d) < 0

Just arrange them in order as shown in the picture and draw curve starting from + from right.

now if f(x) < 0 consider curve having "-" inside and if f(x) > 0 consider curve having "+" and combined solution will be the final solution. I m sure I have recalled it fully but if you guys find any issue on that do let me know, this is very helpful.

Don't forget to arrange then in ascending order from left to right. a<b<c<d

So for f(x) < 0 consider "-" curves and the ans is : (a < x < b) , (c < x < d)
and for f(x) > 0 consider "+" curves and the ans is : (x < a), (b < x < c) , (d < x)

If f(x) has three factors then the graph will have - + - +
If f(x) has four factors then the graph will have + - + - +

If you can not figure out how and why, just remember it.
Try to analyze that the function will have number of roots = number of factors and every time the graph will touch the x axis.

For the highest factor d if x>d then the whole f(x) > 0 and after every interval of the roots the signs will change alternatively.

Hi
Can you please explain this question to me using the graph. I am missing the point when graph is being used here?

If x is an integer, is |x|>1?
(1) (1-2x)(1+x)<0
(2) (1-x)(1+2x)<0

For me ,the first equations roots are -1 and 1/2. Now I am struggling to get to the correct sign using the graph method here.

Same for second equation: roots are 1 and -1/2 but struggling for the sign.

THanks
Re: Inequalities trick   [#permalink] 11 Nov 2014, 08:52

Go to page    1   2   3   4   5   6    Next  [ 111 posts ]

Similar topics Replies Last post
Similar
Topics:
131 Tips and Tricks: Inequalities 27 14 Apr 2013, 08:20
an inequality 1 04 Oct 2010, 02:36
2 Inequality 4 05 Jun 2010, 13:19
47 Laura sells encyclopaedias, and her monthly income has two 22 29 May 2008, 12:54
135 If x/|x|<x which of the following must be true about x? 74 15 Aug 2008, 03:06
Display posts from previous: Sort by


# Angles in a spherical triangle.

Just seeking advice here! I have 3 coordinates;

$$A(-0.52992,0.84805,0),\\ B(0.84805,0,0.52992),\\C(0.15461,0.47553,0.86603)$$.

I want to find the angles at $$A$$, $$B$$ and $$C$$. Hence, I find the normal of the planes through the great circle $$AB$$, $$AC$$, $$BC$$ respectively.

I can easily find that the (unit) normals are

$$n_{AB}:(0.50306,0.31434,-0.80506)\\n_{BC}:(-0.31209,-0.80818,0.49945)\\n_{AC}:(0.77558,0.48464,-0.40448)$$

Is the angle at $$A$$ just $$cos^{-1}(n_{AB}.n_{AC})$$, angle at $$B$$ is $$cos^{-1}(n_{AB}.n_{BC})$$, angle at C is $$cos^{-1}(n_{AC}.n_{BC})$$?

What I am worried is that $$n_{AB}.n_{BC}=-0.81313$$ and hence $$arccos(-0.81313)=2.5203$$. This is the same situation for angle $$C$$. Am I still correct considering that the angles $$B$$ and $$C$$ are more than $$\pi$$? Can an angle be more than $$\pi$$? Or is there any way I can reduce the angle?

Edit: I can try to visualize the points on the sphere, it seems that angle $$C$$ is more than $$\frac{\pi}{2}$$, but angle $$B$$ seems to be less than $$\frac{\pi}{2}$$, am I still correct to say that angle $$B$$ is $$2.52$$ rad?

• Spherical or 3D? 3 points does not define a sphere. – Moti Nov 10 '18 at 2:09
• Spherical. Yes but I am finding the angles of the spherical triangle on a unit sphere. So 3 points on the (unit) sphere do determine a spherical triangle – Icycarus Nov 10 '18 at 16:37
• You can find many spheres that use the same three points which result many solution - for each sphere you have a solution set. You need to say that the three points are of a great circle if you mean this - but than all equal $\pi$ – Moti Nov 10 '18 at 21:20
• @Moti: By "unit sphere", OP certainly means "the unit sphere"; that is, the sphere of unit radius centered at the origin (cf. "the unit circle"). If you're studying spherical triangles, there's no good reason to make your life more complicated by studying them on a non-origin-centered sphere. – Blue Nov 10 '18 at 21:35
• I missed that one. – Moti Nov 10 '18 at 23:52

Two things:

1. $$2.5$$ is not larger than $$\pi=3.1415\dots$$.
2. What you computed was Euclidean angles, not spherical. That is, they are angles between the lines $$AB$$, $$AC$$ and so on. The spherical angles would be the angle between the great circles passing $$A,C$$ and $$A,B$$ respectively.
• Hm.. I learnt that the angles between the great circles passing A,C and A,B is the angle between the normals of the plane passing through AC and AB. Which is what I have calculated, or did I misunderstood something? – Icycarus Nov 10 '18 at 21:22
• Oh yes, thanks for pointing out. What I meant was more than pi/2. Will edit it – Icycarus Nov 10 '18 at 21:23
• Then yes, they can be larger than $\pi/2$. – Quang Hoang Nov 10 '18 at 21:31
• Oh, I missed that part. Yes, I think you are correct. Angle between normals of planes through great circles is the same with angle between them. – Quang Hoang Nov 10 '18 at 21:33
• Oh! Thank you for the explanation! – Icycarus Nov 10 '18 at 21:34

Note that if $$n_{AB}$$ is a unit vector perpendicular to the great circle through $$A$$ and $$B,$$ then so is $$-n_{AB}.$$ For each side of the spherical triangle, there are two unit vectors perpendicular to that side, each of them the exact opposite of the other.

When you reverse the direction of one of the vectors in a dot product, you reverse the sign of the product, and the arc cosine you would have gotten is replaced by its supplement. If you get just one of the unit vectors “backward” when computing the angles, you will compute the exterior angle at the vertex whose interior angle you wanted.

One way to avoid this error is to make sure you take each pair of vectors in your cross products in the same “direction” around the triangle. For example, you can take $$A\times B,$$ $$B\times C,$$ and $$C\times A.$$ Alternatively, you can reverse all three of the cross products. If you use a different method to find the normal unit vectors, make sure that the dot product of each normal with the vector to the remaining vertex is positive in all three cases, or ensure that all three dot products are negative. There is a twist to this, however: when you set up the normals this way, you get normals that go in nearly opposite directions when the vertex angle is very small but go in nearly the same direction when the vertex angle is very large. Therefore simply taking the arc cosine of a dot product, $$\arccos(n_1\cdot n_2).$$ will give you the exterior angle, so you actually want $$\arccos(-n_1\cdot n_2)$$ in order to get the interior angle.

Another way that works (as you noted in a comment) is to use cross products to find the normals, but make sure that the vertex at which you want to find the angle is either the first vector in both cross products or the second vector in both cross products. That way the normals will point in almost the same direction when the angle is small and will be almost opposite when the angle is large, and you can take $$\arccos(n_1\cdot n_2)$$ without requiring a negative sign. Using this method, you need at least four cross products, but since $$B\times A = -A\times B$$ this method does not really require any extra computation, just reverse the vector when you need the other cross product.

One thing you must not do is to have two normals that follow one rule and the third one following the opposite rule. This will cause you to compute exterior angles at two vertices. It looks like your $$n_{AC}$$ is the “wrong way around” compared to your other two normal vectors.

Merely having multiple obtuse angles in a spherical triangle is not an indication that you computed the angles incorrectly. The sum of the angles of a spherical triangle can be anything up to $$540$$ degrees.

• Thanks for the input! I was wondering if this was what you meant; Do find angle at A; I find the angle between $n_{AB}.n_{AC}$, angle at B; angle between $n_{BA}.n_{BC}$, angle at C; angle between $n_{AC}.n_{BC}$, where $n_{AB}$ = $A$ x $B$, $n_{BA}$ = $B$ x $A$ etc – Icycarus Nov 11 '18 at 21:11
• That's not quite what I had in mind but it's a perfectly good method. I've added it to the answer. There are several correct ways to solve this problem! I'm sorry to say I actually made a sign error when I first wrote this up, which confused me because it seemed to imply that you already had the correct angle at $B.$ But I was doing the dot products in my head in a moving car and writing the results on my phone, and I have fixed the error now (I think), so please forgive the confusion. – David K Nov 11 '18 at 23:54

Note that $$n_{AB}=-n_{BA}=\frac{A\times B}{|A|\,|B|}\\ n_{BC}=-n_{CB}=\frac{B\times C}{|B|\,|C|}\\ n_{CA}=-n_{AC}=\frac{C\times A}{|C|\,|A|}$$ Therefore, $$\angle A=\arccos(n_{BA}\cdot n_{CA})=0.51928\\ \angle B=\arccos(n_{AB}\cdot n_{CB})=0.62125\\ \angle C=\arccos(n_{AC}\cdot n_{BC})=2.56032$$ and by Girard's Theorem, the area of the triangle is $$\angle A+\angle B+\angle C-\pi=0.55926$$ where the area of the whole sphere is $$4\pi$$ steradians.
The angle you got for $$\angle B$$ is the supplement of what is computed above, because you have the wrong sign for the dot product. That is, $$\cos(\angle B)=n_{AB}\cdot n_{CB}=n_{BA}\cdot n_{BC}=-n_{AB}\cdot n_{BC}=-n_{BA}\cdot n_{CB}$$


# Integration Problem

• April 4th 2010, 06:46 PM
ninjaku
Integration Problem
Find the integral of $(tanx/sec^2x)dx$

I tried using u substitution, and I get:

$u=tanx$
$du=(sec^2)x$

At first it seems like it was going to be simple.

But in the problem there is a $sec^-2$
And in my substitution there is a $sec^2$.

Any help would be appreciated.
• April 4th 2010, 06:58 PM
skeeter
Quote:

Originally Posted by ninjaku
Find the integral of (tanx/(sec^2)x)dx.

I tried using u substitution, and I get:

u=tanx
du=(sec^2)x.

At first it seems like it was going to be simple.

But in the problem there is a sec^-2.
And in my substitution there is a sec^2.

Any help would be appreciated.

$\frac{\tan{x}}{\sec^2{x}} = \tan{x} \cdot \cos^2{x} = \sin{x} \cdot \cos{x}$

now integrate
• April 5th 2010, 12:41 AM
ninjaku
Quote:

Originally Posted by skeeter
$\frac{\tan{x}}{\sec^2{x}} = \tan{x} \cdot \cos^2{x} = \sin{x} \cdot \cos{x}$

now integrate

Ok after your suggestion. I did the problem two ways.

The first way I did using:

$u=sinx$
$du=cosx$

and got the answer to be $\frac{sin^2x}{2} + c.$

However when I checked it in my calculator, it said the answer was instead, $-\frac{cos^2x}{2} +c.$

Which I found to be the answer when I set :

$u=cosx$
$du=-sinx$

I would just like to know if both of those are correct, or only one.
And if only one of them is correct, how would I know which term I should pick to use for the substitution?
• April 5th 2010, 12:50 AM
harish21
Quote:

Originally Posted by ninjaku
Ok after your suggestion. I did the problem two ways.

The first way I did using:

$u=sinx$
$du=cosx$

and got the answer to be $\frac{sin^2x}{2} + c.$

However when I checked it in my calculator, it said the answer was instead, $-\frac{cos^2x}{2} +c.$

Which I found to be the answer when I set :

$u=cosx$
$du=-sinx$

I would just like to know if both of those are correct, or only one.
And if only one of them is correct, how would I know which term I should pick to use for the substitution?

$\frac{sin^2x}{2} + c = \frac{1-cos^2x}{2} + c= \frac{1}{2}-\frac{cos^2x}{2} +c = -\frac{cos^2x}{2} +c'$

Note: $c' = c + \frac{1}{2}$

these two terms $\frac{sin^2x}{2} + c$ and $-\frac{cos^2x}{2} +c'$ differ only by a constant. Either answer works in this case.
• April 5th 2010, 01:15 AM
ninjaku
That makes a lot of sense, thanks.


# Volumes of solid of revolution: sin(x) + 2 fake proof

I just recently learned about volumes of solids of revolution in my AP Calculus class and tried to create a problem to connect it to related rates. In this process, I found an error that neither my teacher or I seem to be able to figure out. It goes as follows:

The region contained by the function $y=\sin(x) + 2$, the line $x=2$, and the $y$-axis as shown below is revolved around the $x$-axis.

Example Image

We find the volume of the solid created by the disk method as follows:

$$V=\pi r^2 * \text{thickness}$$

$$r=\sin(x) + 2$$

$$V=\int_{0}^{2\pi} (\sin(x)+2)^2dx$$

$$V=9\pi ^ 2$$

We also know that $\int_{0}^{2\pi} \sin(x)dx=0$ therefore $\int_{0}^{2\pi}2dx=\int_{0}^{2\pi}(\sin(x)+2)dx$ so if we revolve a new region with the line $y=2$ in place of $y=\sin(x) + 2$ : The volume of the two solids should be the same.

Example Image

But we know that revolving the above solid around the $x$-axis would create a cylinder with volume $A=\pi r^2h$. In this problem, $r=2$, and $h=2$, so $V=8\pi^2$. Why are the volumes not equivalent?

• Why should the integral between 0 and 2 of the sine be zero? Should it be $2 \pi$? – Lonidard Dec 9 '15 at 22:03
• There are several pieces of your post that aren't rendering correctly, so it's difficult to say what your error may be. – Cameron Buie Dec 9 '15 at 22:06
• I fixed the formulas, that should be better, sorry, this is the first time I'm posting – ozay34 Dec 9 '15 at 22:10
• Since when is $$\int_{0}^{2 \pi} 2 dx = 0$$ ? – Mattos Dec 9 '15 at 22:12
• sorry, I fixed it – ozay34 Dec 9 '15 at 22:13

Hint:

The volume generated by the first half of the sine function (over $y=2$) is not the same as the volume generated by the second half (below $y=2$) because the radii of rotation are not the same.

In other words the same area generate different volumes if it is rotated with respect an axis with different radii of rotation.

One possible source of error is this: you are quite right that $$\int_0^{2\pi}2\,dx=\int_0^{2\pi}(2+\sin x)\,dx,$$ but this is not what you're dealing with! Rather, your integrand is $$(2+\sin x)^2=4+4\sin x+(\sin x)^2,$$ and so your volume is $$\pi\int_0^{2\pi}(2+\sin x)^2\,dx=4\pi\int_0^{2\pi}\,dx+\pi\int_0^{2\pi}(\sin x)^2\,dx.$$

Can you take it from there?

Another error is the assumption that the area of the solid of rotation $y=2$ is the same as the solid of rotation of $y=2+\sin x.$ It's true that the average radius is the same. However, the average cross-sectional area is not the same. (In general, the average of squared is not the square of the average.)

• but even if the average cross sectional area isn't the same for $y=2+sinx$, the added part for the first $\pi$ is compensated for by the second part from $\pi$ to $2\pi$, or so I thought. But as Emilio said, that isn't equivalent. I don't understand how that statement is true though because $\int_{0}^{2\pi}sinxdx=0$ – ozay34 Dec 9 '15 at 22:28
• Ok, thinking about it, I understand what Emilio is talking about, but I guess because I cant visualize it, it seems like it should work – ozay34 Dec 9 '15 at 22:31
• The kicker is that if $0<t\le1,$ then $$(2+t)^2-2^2=4+4t+t^2-4=4t+t^2$$ and $$2^2-(2-t)^2=4-(4-4t+t^2)=4-4+4t-t^2=4t-t^2.$$ Hence, $$(2-t)^2-2^2>2^2-(2-t)^2,$$ even though $$2+t-2=2-(2-t).$$ – Cameron Buie Dec 9 '15 at 22:39
• Translated into terms of volumes, the section between $x=0$ and $x=\pi$ has more extra volume (compared to the cylinder) than the section between $x=\pi$ and $x=2\pi$ loses (compared to the cylinder). – Cameron Buie Dec 9 '15 at 22:42


# Matrix Inverse Question

Let $C$ be an invertible 2x2 matrix such that:

$$C^{-1} \cdot \begin{bmatrix}1 \\ 2\end{bmatrix} = \begin{bmatrix}3 \\ 4\end{bmatrix}$$

$$C^{-2} \cdot \begin{bmatrix}9 \\ 5\end{bmatrix} = \begin{bmatrix}3 \\ 4\end{bmatrix}$$

Find $2\times2$ matrices $A$ and $B$ so that $CA=B$ and solve for $C$.

-
Can you please format your question using LaTex / MathJax? I am having a tough time reading it. Regards –  Amzoti Mar 11 '13 at 4:27
I am not familiar with putting in matrices :/ each matrix one column and 2 rowes; hope that helps –  IndividualThinker Mar 11 '13 at 4:30
Is $C^{-1}, C^{-2}$ supposed to represent column 1 and column 2? Also, did I capture what you were trying to write? You can find guidance on Latex / MathJax in the FAQ (see link on right of top-of-page). Regards –  Amzoti Mar 11 '13 at 4:35

$$\pmatrix{1\cr2\cr}=C\pmatrix{3\cr4\cr}$$

$$\pmatrix{9\cr5\cr}=CC\pmatrix{3\cr4\cr}=C\pmatrix{1\cr2\cr}$$

Now do you see what to use for $A$ and $B$?

-
Got it ! thanks! –  IndividualThinker Mar 11 '13 at 15:17

Hint $\rm\ C\,(C^{-1} u = v)\:\Rightarrow\: u\, =\, \color{#C00}{C v}$

And $\rm\ C^2\, (C^{-2}w = v)\:\Rightarrow\: w = C(\color{#C00}{Cv}) = Cu$

Thus $\rm\ C\, (u,v) = (w,u)$

-


# Find expectation of $\frac{X_1 + \cdots + X_m}{X_1 + \cdots + X_n}$ when $X_1,\ldots,X_n$ are i.i.d

Let $$X_1, \ldots, X_n$$ be i.i.d. random variables with expectation $$a$$ and variance $$\sigma^2$$, taking only positive values. Let $$m < n$$. Find the expectiation of $$\displaystyle\frac{X_1 + \cdots + X_m}{X_1 + \cdots + X_n}$$.

My attemps to solve this probles are rather straightforward. Denote $$X = X_1 + \cdots + X_m$$ and $$Y = X_{m+1} + \dots + X_n$$. So, $$X$$ has the expectation $$ma$$ and the variance $$m\sigma^2$$. And $$Y$$ has the expectation $$(n-m)a$$ and variance $$(n-m)\sigma^2$$. And also $$X$$ and $$Y$$ are independent. So we can compute the expectation by the definition $$\mathbb{E}\displaystyle\frac{X}{X+Y} = \int\limits_{\Omega^2}\frac{X(\omega_1)}{X(\omega_1) + Y(\omega_2)}\mathbb{P}(d\omega_1)\mathbb{P}(d\omega_2)$$. But we do not know the distribution, so we do not have chance to calculate it.

I would be glad to any help or ideas!

• Hint. You have $$\mathbb{E}\left[ \frac{X_1}{X_1+\cdots+X_n} \right] = \cdots = \mathbb{E}\left[ \frac{X_n}{X_1+\cdots+X_n} \right]$$ and $$\frac{X_1+\cdots+X_n}{X_1+\cdots+X_n} = 1.$$ – Sangchul Lee Sep 7 '17 at 10:29
• @SangchulLee how do you prove $\mathbb{E}\left[ \frac{X_1}{X_1+\cdots+X_n} \right] = \mathbb{E}\left[ \frac{X_n}{X_1+\cdots+X_n} \right]$ ? It doesn't look obvious to me. – Gabriel Romon Sep 7 '17 at 12:30
• @LeGrandDODOM, Since $X_1, \cdots, X_n$ are i.i.d., they are exchangable: for any permutation $\sigma$ on $\{1,\cdots,n\}$ we have the following equality in distribution: $$(X_1, \cdots, X_n) \stackrel{d}{=} (X_{\sigma(1)}, \cdots, X_{\sigma(n)} ).$$ And since the expectation depends only on the distribution, we have $$\mathbb{E}\left[\frac{X_1}{X_1+\cdots+X_n}\right] = \mathbb{E}\left[\frac{X_{\sigma(n)}}{X_{\sigma(1)}+\cdots+X_{\sigma(n)}}\right] = \mathbb{E}\left[\frac{X_{\sigma(n)}}{X_1+\cdots+X_n}\right].$$ – Sangchul Lee Sep 7 '17 at 12:33
• @SangchulLee if say $s_{i} = \frac{X_{i}}{\sum_{j=1}^{n}}X_{j}$, then while calculating expectation (in continuous case) we will have $s_{i}$ under the integrsl sign too,that is while calculating $E(s_{i})$ the term inside integral that is $s_{i}$ will be varing ,so how can we show that expectation of each $s_{i}$ are the same? or if $X_{i}$ are identically distributed then does that mean $s_{i}$ are identically distributed? I too get theintuition that they are same but how do i prove it? – BAYMAX Sep 16 '17 at 1:06
• @BAYMAX, If $X_i$ has common p.d.f. $f$, then $$\mathbb{E}\left[\frac{X_i}{X_1+\cdots+X_n}\right]=\int_{(0,\infty)^n}\frac{x_i}{x_1+\cdots+x_n}f(x_1)\cdots f(x_n)\,dx_1\cdots dx_n.$$ Now you can interchange the role of $x_1$ and $x_i$ to find that this expectation does not depend on $i$. This line of reasoning can be extended to arbitrary distribution on $(0,\infty)$. – Sangchul Lee Sep 16 '17 at 2:03

Suppose $$S_m=\sum\limits_{i=1}^{m} X_i$$ and $$S_n=\sum\limits_{i=1}^n X_i$$.

Now, $$\frac{X_1+X_2+\cdots+X_n}{S_n}=1\,, \text{ a.e. }$$

Therefore,

$$\mathbb E\left(\frac{X_1+X_2+\cdots+X_n}{S_n}\right)=1$$

Since $$X_1,\ldots,X_n$$ are i.i.d (see @SangchulLee's comments on main), we have for each $$i$$,

$$\mathbb E\left(\frac{X_i}{S_n}\right)=\frac{1}{n}$$

So for $$m\le n$$, $$\mathbb E\left(\frac{S_m}{S_n}\right)=\sum_{i=1}^m \mathbb E\left(\frac{X_i}{S_n}\right)=\frac{m}{n}$$

• How to prove that $\frac{X_i}{S_n}$ and $\frac{X_j}{S_n}$ are independent? – Alex Grey Sep 7 '17 at 11:10
• @AlexGrey That isn't really used anywhere. As the $X_i$'s are identically distributed, $E\left(\frac{X_1}{S_n}\right)=E\left(\frac{X_2}{S_n}\right)=...=E\left(\frac{X_n}{S_n}\right)$ and we simultaneously have $\sum_{i=1}^nE\left(\frac{X_i}{S_n}\right)=1$. – StubbornAtom Sep 7 '17 at 11:18
• @AlexGrey, And in general they are not independent. – Sangchul Lee Sep 7 '17 at 11:21
• @StubbornAtom How do you prove $E\left(\frac{X_1}{S_n}\right)=E\left(\frac{X_2}{S_n}\right)$ ? It doesn't look obvious to me. – Gabriel Romon Sep 7 '17 at 12:30
• @LeGrandDODOM I feel we don't need anything more after Sangchul's comment. – StubbornAtom Sep 7 '17 at 13:10


# Is there a general method to find integer x,y solutions to $A^x=B^y-1$?

## Problem

For the equation:

$$12^x=5^y-1$$

I want to prove it has no solutions with x,y being positive integers.

## Question

Is there a general method for solving this type of equation? (It looks vaguely like a Pell equation, but not close enough that I can see how to solve it with standard methods)

If not, is there an elegant method to prove it for the particular case here (with $$A=12$$ and $$B=5$$)?

## What I've tried

Thinking modulo 12, the LHS = 0, and the RHS is 0 if and only if y is even. Writing $$y=2z$$, I can then factorize the RHS into $$(5^z+1)(5^z-1)$$

Both factors are even and by thinking modulo 3, only one of these factors can be divisible by 3. So I conclude that I need something like $$5^z+1=2^?3^x$$ and $$5^z-1=2^?$$ or vice versa.

Subtracting these equations I need $$2=2^?3^x-2^?$$.

If I now think in binary, these equations look like $$10_2 = (11_2)^x100..00_2 - 100...00_2$$.

It seems to make sense (but I don't see how to mathematically express this idea) that the only way this equation will work is as $$5^1+1=2.3$$ and $$5^1-1=2.2$$ but this solution results in a LHS of 24, which is not a power of 12.

However, I feel there must be a less convoluted proof!

• what is $\gcd(5^z - 1, 5^z + 1)?$ – Will Jagy Oct 11 '16 at 20:15
• Two, so this certainly cuts down the options for the factors a great deal (as one factor must have just a single 2). Is there more I should conclude? – Peter de Rivaz Oct 11 '16 at 20:18
• Mihăilescu's theorem kills all of these problems. – Fan Zheng Oct 11 '16 at 20:20
• that should be enough. Meanwhile, over the past few days I have been fiddling with questions such as $7^x - 3^y = 100,$ there seems to be a procedure but it is not easy math.stackexchange.com/questions/1946621/… – Will Jagy Oct 11 '16 at 20:21

As an illustration, let us solve $3^A - 2^B = 1,$ which will finish the other answer. We suspect the largest solution is $9-8=1.$ Take $3^A = 2^B + 1$ and subtract $9$ from both sides, for $3^A - 9 = 2^B - 8.$ Divide out both factors and introduce new variables, for $$9 (3^x - 1) = 8(2^y - 1).$$ We will show that this is impossible with $x,y \geq 1.$

Little explanation: given $m,n \geq 2$ with $\gcd(m,n) = 1,$ we know that $m^{\varphi(n)} \equiv 1 \pmod n.$ However, there may be a smaller $k$ with $m^{k} \equiv 1 \pmod n.$ If so, we take the smallest such $k$ and call it the order, sometimes multiplicative order, of $m \pmod n.$

We proceed under the assumption that $x \geq 1$ and $y \geq 1.$

Now, $2^y \equiv 1 \pmod 9.$ This means that $$6 | y.$$

jagy@phobeusjunior:~$./order 2 9 9 6 = 2 * 3  Furthermore,$2^6 - 1 | 2^y - 1.$$$2^6 - 1 = 63 = 3^3 \cdot 7.$$ Therefore$7 | (3^x - 1),$$$3^x \equiv 1 \pmod 7.$$ Therefore $$6 | x,$$ and$3^6 - 1$divides$3^x - 1.$jagy@phobeusjunior:~$ ./order 3 7
7     6 = 2 * 3

$$3^6 - 1 = 8 \cdot 7 \cdot 13.$$

Therefore $$2^y \equiv 1 \pmod {13},$$ $$12 | y.$$

jagy@phobeusjunior:~$./order 2 13 13 12 = 2^2 * 3  In particular $$4 | y,$$ and$2^y - 1$is divisible by$15,$especially divisible by$5.$$$3^x \equiv 1 \pmod 5,$$ so $$4 | x.$$ jagy@phobeusjunior:~$ ./order 3 5
5     4 = 2^2

However, $$3^4 - 1 = 80 = 5 \cdot 16.$$ This means that $8 (2^y - 1)$ is divisible by $16,$ a contradiction of $$9 (3^x - 1) = 8(2^y - 1)$$ with $x,y \geq 1.$

The powers of $5$ mod $11$ are $5,3,4,9$, and $1$. Thus $5^y-1\in\{4,2,3,8,0\}$ mod $11$. But $12^x\equiv1^x=1$ mod $11$. So $12^x=5^y-1$ can have no solutions in positive integers.

Remark (added later, on reading the question's request for a general method): A key feature of the equation $12^x=5^y-1$ that makes a simple congruence-based approach possible is the fact that we're proving the equation has no solutions. For equations like $2^x=3^y-1$ (see Will Jagy's excellent answer), where you're trying to prove it has just one solution, a simple congruence-based approach doesn't have a chance.

If $y$ is odd then $5^y-1=1 \pmod 3$ while $12^x=0 \pmod 3$. So there are no solutions whit $y$ odd.

Let $y=2z$. Then the equation is $12^x=25^z-1$. Thinking$\pmod {13}$, the left hand side is $1$ or $-1$ while the right hand side is $0$ or $2$. Then there are no solutions with $y$ even, and therefore no solutions at all.

That one is easy, clearly $y=1$ has no solutions.

working $\bmod 3$ we get $y$ is even, so $y=2k$ with $k\geq 1$.

From here $12^x=5^{2y}-1=(5^y+1)(5^y-1)$.

Clearly one factor must be $2\times 3^x$ and the other must be $4^{x-1}\times 2$.

Therefore we have $2\times 3^x=4^{x-1}\times 2+2$ or $2\times 3^x=4^{x-1}\times 2 -2$

The first is equivalent to $3^x=4^{x-1}+1$ and the second is equivalent to $3^x=4^{x-1}-1$.

It is easy to see neither have solutions by looking at the following table:

$$\begin{pmatrix} 1 & 1 \\ 3 & 4 \\ 9 & 16\\ 27 & 64\\ 81 & 256\\ 243 & 1024\\ \end{pmatrix}$$

• I do not understand how the table means there are no solutions, can you explain more? – Peter de Rivaz Oct 11 '16 at 20:46
• @PeterdeRivaz I put a proof about $3^A - 2^B = 1$ as an answer. – Will Jagy Oct 11 '16 at 22:48


# Poisson's equation with Robin boundary conditions

Explain how to define $u \in H^1(U)$ to be a weak solution of Poisson's equation with Robin boundary conditions: \begin{align} \begin{cases} \, \, \, \, -\Delta u = f & \text{in }U \\ u+\frac{\partial u}{\partial v}=0 & \text{on } \partial U. \end{cases} \end{align} Discuss the existence and uniqueness of a weak solution for a given $f \in L^2(U)$.

This is Exercise 5 in Chapter 6 of PDE Evans, 2nd edition.

I would like to define the bilinear form $B[u,v]$, for all $u,v \in H_0^1(U)$. But they did not really give that to the reader, unlike in Exercises 3 and 4 in the textbook.

Should I still define $B[u,v]$? If so, then I can try to satisfy the hypotheses of the Lax-Milgram Theorem, which would allow me to assert the existence of a weak solution to this problem.

It is not appropriate to work in the space $$H^1_0(U)$$ since nonzero boundary conditions are being considered. You will have to assume some regularity of the boundary of $$U$$.

One version of Green's theorem (see e.g. the appendix in Evans) is that $$- \int_U (\Delta u) v \, dx = \int_U Du \cdot Dv \, dx -\int_{\partial U} \frac{\partial u}{\partial \nu} v \, dS.$$

A weak solution to the problem at hand can be proposed by setting $$-\Delta u = f$$ in $$U$$ and $$\dfrac{\partial u}{\partial \nu} = -u$$ on $$\partial U$$ so that $$\int_U fv = \int_U Du \cdot Dv + \int_{\partial U} uv \, dS \quad \forall v \in H^1(U)$$ or a bit more precisely $$\int_U fv = \int_U Du \cdot Dv + \int_{\partial U} \newcommand{\tr}{\mathrm{Tr}\ \! }( \tr u )(\tr v) \, dS \quad \forall v \in H^1(U)$$ where $$\tr : H^1(U) \to L^2(\partial U)$$ is the trace operator.

An appropriate bilinear form is thus given by $$B[u,v] = \int_U Du \cdot Dv + \int_{\partial U} \newcommand{\tr}{\mathrm{Tr}\ \! }( \tr u )(\tr v) \, dS, \quad u,v \in H^1(U).$$ $$B$$ is clearly bounded. As far as coercivity goes, it may be helpful to use the Rellich-Kondrachov theorem. I can follow up with a hint if you like.

It remains to show that there is a constant $$\alpha > 0$$ with the property that $$\|u\|_{H^1}^2 \le \alpha B[u,u]$$ for all $$u \in H^1(U)$$. This can be proven by contradition. Otherwise, for every $$n \ge \mathbb N$$ there would exist $$u_n \in H^1(U)$$ with the property that $$\|u_n\|^2_{H^1} > n B[u_n,u_n]$$. For each $$n$$ define $$v_n = \dfrac{u_n}{\|u_n\|_{H^1}}$$. Then $$v_n \in H^1(U)$$, $$\|v_n\|_{H^1} = 1$$, and $$B[v_n,v_n] < \dfrac 1n$$ and all $$n$$.

Here we can invoke Rellich-Kondrachov. Since the family $$\{v_n\}$$ is bounded in the $$H^1$$ norm, there is a subsequence $$\{v_{n_k}\}$$ that converges to a limit $$v \in L^2(U)$$. However, since $$\|Dv_{n_k}\|_{L^2}^2 < \dfrac{1}{n_k}$$ it is also true that $$Dv_{n_k} \to 0$$ in $$L^2$$. Thus for any $$\phi \in C_0^\infty(U)$$ you have $$\int_U v D \phi \, dx = \lim_{k \to \infty} \int_U v_{n_k} D \phi \, dx = - \lim_{k \to \infty} \int_U D v_{n_k} \phi \, dx = 0.$$ This means $$v \in H^1(U)$$ and $$D v = 0$$, from which you can conclude $$v_{n_k} \to v$$ in $$H^1(U)$$. Since $$\|v_{n_k}\|_{H^1} = 1$$ for all $$k$$ it follows that $$\|v\|_{H^1} = 1$$ as well.

Next, since $$\|\tr v_{n_k}\|_{L^2(\partial U)}^2 < \dfrac{1}{n_k}$$ and the trace operator is bounded there is a constant $$C$$ for which $$\|\tr v\|_{L^2(\partial \Omega)} \le \|\tr v - \tr v_{n_k}\|_{L^2(\partial \Omega)} + \|\tr v_{n_k}\|_{L^2(\partial \Omega)} < \frac{1}{n_k} + C \|v - v_{n_k}\|_{H^1(U)}.$$ Let $$k \to \infty$$ to find that $$\tr v = 0$$ in $$L^2(\partial U)$$.

Can you prove that if $$v \in H^1(U)$$, $$Dv = 0$$, and $$\tr v = 0$$, then $$v = 0$$? Once you have established that fact you arrive at a contradiction, since $$v$$ also satisfies $$\|v\|_{H^1} = 1$$. It follows that $$B$$ is in fact coercive.

• I tried to edit your response to fix (what I thought) were typos, and tried to clarify minor things, to avoid ambiguity and make it easier for me to follow. Lastly, I changed the $\Omega$ to $U$, just to stay consistent with Evans' notation. Are all modifications changes correct? Because, for example, we never had $\Delta u = f$ on $\partial U$, when we were given $-\Delta u = f$ in $U$ by the problem. – Cookie Feb 2 '15 at 16:37
• Looks good. Thanks for pointing out the errors. – Umberto P. Feb 2 '15 at 17:03
• There's another one (I didn't modify), I think. Shouldn't the trace operator $T$ be mapped from $H^1(U) \to L^2(\color{red}{\partial}U)$? – Cookie Feb 2 '15 at 19:38
• Yeah, I just fixed it. – Umberto P. Feb 2 '15 at 19:46
• Fundamental question, I know, but does the $\frac{\partial u}{\partial \nu}$ in the "$u+\frac{\partial u}{\partial \nu}=0$ on $\partial U$" suggest that $\partial U$ is $C^1$? I'm asking since the problem doesn't explicitly state this, and the Trace Theorem requires this in its hypothesis. I want to be absolutely sure that we can conclude $Tu=u\vert_{\partial U}$ from the Trace theorem, as you are doing so in the line after writing "a bit more precisely" in your answer. – Cookie Feb 3 '15 at 20:12


# Prove $\binom{n}{m}\binom{m}{k} = \binom{n}{k}\binom{n-k}{m-k}$

I need to prove the following:

If $n,m,k\in \mathbb{N}$ and $k\leq m \leq n$, then

$$\binom{n}{m}\binom{m}{k} = \binom{n}{k}\binom{n-k}{m-k}$$.

I did the following steps:

\begin{align} \require{cancel} \binom{n}{m}\binom{m}{k} &= \binom{n}{k}\binom{n-k}{m-k} \\ \frac{n!}{m!(n-m)!}\cdot \frac{m!}{k!(m-k)!} &= \frac{n!}{k!(n-k)!}\cdot \frac{(n-k)!}{(m-k)!(n-k-m+k)!}\\ \frac{n!}{\cancel{m!}(n-m)!}\cdot \frac{\cancel{m!}}{k!(m-k)!} &= \frac{n!}{k!\cancel{(n-k)}!}\cdot \frac{\cancel{(n-k)}!}{(m-k)!(n-k-m+k)!} \\ \frac{n!}{k!(n-m)!(m-k)!} &= \frac{n!}{k!(n-m)!(m-k)!} \end{align}

The question is: is my proof correct? Are all my steps valid?

Thanks

• Maybe it is just me, but I am little confused of how you went in one step from $(m-k)!(n-k-m+k)!$ to $(n-m)!(m-k)!$ – imranfat Mar 20 '14 at 19:15
• @imranfat, $(n−k−m+k)!=(n-m)!$. – DKal Mar 20 '14 at 19:16
• Ok, I see it now, there has been a complete brainfart in my head going on... – imranfat Mar 20 '14 at 19:24
• Thanks for the edit Umberto! – Jeel Shah Mar 20 '14 at 19:32

It is correct!

An other way to prove this is the following:

$$\binom{n}{m}\binom{m}{k} = \frac{n!}{m!(n-m)!} \frac{m!}{k!(m-k)!}= \frac{n!}{(n-m)!} \frac{1}{k!(m-k)!}=\frac{n!}{k!} \frac{1}{(m-k)!(n-m)!}=\frac{n!}{k!(n-k)!} \frac{(n-k)!}{(m-k)!(n-m)!}=\binom{n}{k}\frac{(n-k)!}{(m-k)!((n-k)-(m-k))!}=\binom{n}{k} \binom{n-k}{m-k}$$

• The back of the book suggested that I use the following fact $\binom{n+1}{k+1} = \frac{n+1}{k+1}\binom{n}{k}$. How would I use that? Also, on the second last portion i.e. $(n-m)!$ going to $((n-k)-(m-k))!$ is that because we have $n = n-k$ and $m=m-k$? – Jeel Shah Mar 20 '14 at 19:31
• As regards the second question: $$(n-m)!=(n-m+0)!=(n-m+k-k)!=(n-k-m+k)!=((n-k)-(m-k))!$$ – Mary Star Mar 20 '14 at 19:34
• To use the relation $$\binom{n+1}{k+1}=\frac{n+1}{k+1} \binom{n}{k}$$ you could do the following: $$\binom{n}{m}=\frac{n}{m} \binom{n-1}{m-1}=...=\frac{n \cdot ... \cdot (n-k+1)}{m \cdot ... \cdot (m-k+1)} \binom{n-k}{m-k}=\frac{\frac{n!}{(n-k)!}}{\frac{m!}{(m-k)!}} \binom{n-k}{m-k}=\frac{\frac{n!}{k!(n-k)!}}{\frac{m!}{k!(m-k)!}} \binom{n-k}{m-k}= \frac{ \binom{n}{k} }{ \binom{m}{k} } \binom{n-k}{m-k}$$ So $$\binom{n}{m} \binom{m}{k}= \frac{ \binom{n}{k} }{ \binom{m}{k} } \binom{n-k}{m-k} \binom{m}{k}= \binom{n}{k} \binom{n-k}{m-k}$$ – Mary Star Mar 20 '14 at 22:41

You appear to do this in a non-standard way, but it looks alright (reading the equations from top to bottom instead of left to right).

Ever thought of a combinatoric proof?

Looks correct to me. Alternatively, you can give a combinatorial proof: both sides of the equation count the number of options to choose subsets $K\subseteq M\subseteq N$, where $N$ is a set of $n$ elements, $M\subseteq N$ is a subset of $m$ elements, and $K\subseteq M$ is a subset of $k$ elements. On the LHS you choose $M$ and then choose $K$ in $M$. On the RHS you choose $K$ in $N$ first, and then determine $M$ by choosing $m-k$ more elements from $N\setminus K$.


Effect of multiplying a matrix by a diagonal matrix. Each task will calculate a subblock of the resulting matrix C. If A and B are diagonal, then C = AB is diagonal. In this post, we explain how to diagonalize a matrix if it is diagonalizable. Matrix Multiplication. Next, we are going to calculate the sum of diagonal elements in this matrix using For Loop. But to multiply a matrix by another matrix we need to do the "dot product" of rows and columns ... what does that mean? Where do our outlooks, attitudes and values come from? Accelerating the pace of engineering and science. Explicitly: Way of enlightenment, wisdom, and understanding, America, a corrupt, depraved, shameless country, The test of a person's Christianity is what he is, Ninety five percent of the problems that most people Q. The mmult program will calculate C = AB, where C, A, and B are all square matrices. Diagonal matrices. What I actually need is a method to multiply each diagonal in A by some constant (i.e. Multiplying two matrices is only possible when the matrices have the right dimensions. Effect of multiplying a matrix by a diagonal matrix. if A is of size n*m then we have vector c of length (n+m-1)). Thanks Teja for that, I have updated my question to reflect a further requirement which I don't think your solution completes? De diagonale elementen kunnen al of niet gelijk zijn aan nul. The punishment for it is real. Self-imposed discipline and regimentation, Achieving happiness in life --- a matter of the right strategies, Self-control, self-restraint, self-discipline basic to so much in life. ; Step 3: Add the products. I will calculate these offline and store them in an 3-d array "J". Explicitly: Q. With the help of Numpy matrix.diagonal() method, we are able to find a diagonal element from a given matrix and gives output as one dimensional matrix.. Syntax : matrix.diagonal() Return : Return diagonal element of a matrix Example #1 : In this example we can see that with the help of matrix.diagonal() method we are able to find the elements in a diagonal of a matrix. Based on your location, we recommend that you select: . De ×-matrix = (,) is een diagonaalmatrix als voor alle , ∈ {,, …,}: , = ≠ Diagonaalmatrices worden volledig bepaald door de waarden van de elementen op de hoofddiagonaal. tl;dr Use loops. in good habits. Not all matrices are diagonalizable. Let us define the multiplication between a matrix A and a vector x in which the number of columns in A equals the number of rows in x . In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. Thanks Teja Method 3 worked out to be faster. MathWorks is the leading developer of mathematical computing software for engineers and scientists. Yes, but first it is ONLY true for a matrix which is unitary that is a matrix A for which AA'=I. In order to multiply matrices, Step 1: Make sure that the the number of columns in the 1 st one equals the number of rows in the 2 nd one. Flip square matrices over the main diagonal. A. Unable to complete the action because of changes made to the page. In addition, m >> n, and M is constant throughout the course of the algorithm, with only the elements of D changing. In a previous post I discussed the general problem of multiplying block matrices (i.e., matrices partitioned into multiple submatrices). in .The mmult program can be found at the end of this section. Here it is for the 1st row and 2nd column: (1, 2, 3) • (8, 10, 12) = 1×8 + 2×10 + 3×12 = 64 We can do the same thing for the 2nd row and 1st column: (4, 5, 6) • (7, 9, 11) = 4×7 + 5×9 + 6×11 = 139 And for the 2nd row and 2nd column: (4, 5, 6) • (8, 10, 12) = 4×8 + 5×10 + 6×12 = 15… What is the effect of pre-multiplying a matrix. People are like radio tuners --- they pick out and For simplicity we assume that m x m tasks will be used to calculate the solution. for loop version Elapsed time is 0.000154 seconds. Poor Richard's Almanac. example. sparse matrix multiply Elapsed time is 0.000115 seconds. In a square matrix, transposition "flips" the matrix over the main diagonal. Multiplication of diagonal matrices is commutative: if A and B are diagonal, then C = AB = BA.. iii. I wish to find the most efficient way to implement the following equation, is a m*n dense rectangular matrix (with no specific structure), and, is a m*m diagonal matrix with all positive elements. Each other elements will move across the diagonal and end up at the same distance from the diagonal, on the opposite side. Choose a web site to get translated content where available and see local events and offers. Example1 Live Demo Other MathWorks country sites are not optimized for visits from your location. have come from personal foolishness, Liberalism, socialism and the modern welfare state, The desire to harm, a motivation for conduct, On Self-sufficient Country Living, Homesteading. The effect is that of multiplying the i-th column of matrix A by the factor ki i.e. i.e. '*B; toc; Again, depending on what m and n actually are, the fastest method may be different (for this choice of m and n, it seems method 3 is somewhat faster). Topically Arranged Proverbs, Precepts, Diagonalize the matrix A=[4−3−33−2−3−112]by finding a nonsingular matrix S and a diagonal matrix D such that S−1AS=D. There are two types of multiplication for matrices: scalar multiplication and matrix multiplication. Diagonal matrix. In our next example we program a matrix-multiply algorithm described by Fox et al. Reload the page to see its updated state. Multiplying a Vector by a Matrix To multiply a row vector by a column vector, the row vector must have as many columns as the column vector has rows. Common Sayings. Hell is real. Inverse matrix Let Mn(R) denote the set of all n×n matrices with real entries. My numbers indicate that ifort is smart enough to recognize the loop, forall, and do concurrent identically and achieves what I'd expect to be about 'peak' in each of those cases. A new example problem was added.) I reshape J to an [(n^2) x m] matrix since we want to take linear combinations of its columns by postmultiplying it with the elements in D. % Preallocate J for n*n*m elements of storage. https://www.mathworks.com/matlabcentral/answers/87629-efficiently-multiplying-diagonal-and-general-matrices#answer_97203, https://www.mathworks.com/matlabcentral/answers/87629-efficiently-multiplying-diagonal-and-general-matrices#comment_170160, https://www.mathworks.com/matlabcentral/answers/87629-efficiently-multiplying-diagonal-and-general-matrices#answer_97194, https://www.mathworks.com/matlabcentral/answers/87629-efficiently-multiplying-diagonal-and-general-matrices#comment_169818, https://www.mathworks.com/matlabcentral/answers/87629-efficiently-multiplying-diagonal-and-general-matrices#comment_170168. Find the treasures in MATLAB Central and discover how the community can help you! I then discussed block diagonal matrices (i.e., block matrices in which the off-diagonal submatrices are zero) and in a multipart series of posts showed that we can uniquely and maximally partition any square matrix into block… To multiply a matrix by a scalar, multiply each element by the scalar. Quotations. Wisdom, Reason and Virtue are closely related, Knowledge is one thing, wisdom is another, The most important thing in life is understanding, We are all examples --- for good or for bad, The Prime Mover that decides "What We Are". columns of the original matrix are simply multiplied by successive diagonal elements of the Let us see with an example: To work out the answer for the 1st row and 1st column: Want to see another example? A. This program allows the user to enter the number of rows and columns of a Matrix. D = diag(v,k) places the elements of vector v on the kth diagonal. (Update 10/15/2017. listen to one wavelength and ignore the rest, Cause of Character Traits --- According to Aristotle, We are what we eat --- living under the discipline of a diet, Personal attributes of the true Christian, Love of God and love of virtue are closely united, Intellectual disparities among people and the power Consider the matrix multiplication below For the product to be a diagonal matrix, a f + b h = 0 ⇒ a f = -b h and c e + d g = 0 ⇒ c e = -d g Consider the following sets of values The the matrix product becomes: Thus, as can be seen we can obtain a diagonal matrix that is a product of non diagonal matrices. But you can do something similar. Scalar Matrix Multiplication. As an example, we solve the following problem. In addition, m >> n, and, is constant throughout the course of the algorithm, with only the elements of, I know there are tricks for a related problem (D*M*D) to reduce the number of operations considerably, but is there one for this problem? Suppose there exists an n×n matrix B such that AB = BA = In. iii. If A is an m x n matrix and B is as n x p matrix The matrix multiplication algorithm that results of the definition requires, in the worst case, multiplications of scalars and (−) additions for computing the product of two square n×n matrices. This can only be done if the number of columns in the first matrix is equal to the number of rows in the second. Ideally is there a way to factorize / rearrange this so I can compute, offline (or something similar), and update. rows of the original matrix are simply multiplied by successive diagonal elements of the diagonal Now, I can use J to quickly calculate the answer for any D. We'll try all 3 methods. In de lineaire algebra is een diagonaalmatrix een vierkante matrix, waarvan alle elementen buiten de hoofddiagonaal (↘) gelijk aan nul zijn. Example in $\def\R{\Bbb R}\R^2$. Sometimes we need to find the sum of the Upper right, Upper left, Lower right, or lower left diagonal elements. tic; D = sparse(1:m,1:m,d); A = M'*D*M; toc; tic; B = bsxfun(@times,M,sqrt(d)); B = B. Here's an example of it in action - you can see that it far outperforms the standard dense multiply, sparse matrix multiply, and for loop versions: >> onesmatrixquestion dense matrix multiply Elapsed time is 0.000873 seconds. The main diagonal (or principal diagonal or diagonal) of a square matrix goes from the upper left to the lower right. Matrices where (number of rows) = (number of columns) For the matrices with whose number of rows and columns are unequal, we call them rectangular matrices. Let A be an n×n matrix. An m times n matrix has to be multiplied with an n times p matrix. diagonal matrix. In other words, the elements in a diagonal line from element a 11 to the bottom right corner will remain the same. Sin is serious business. The effect is that of multiplying the i-th row of matrix A by the factor kii.e. Left-multiplication be a diagonal matrix does not have any simple effect on eigenvalues, and given that eigenvalues are perturbed (or destroyed) what could one possibly want to say about "corresponding" eigenvectors? Notice how this expression is linear in the entries of D. You can express D as a sum of elementary basis functions. Deﬁnition. (The pre-requisite to be able to multiply) Step 2: Multiply the elements of each row of the first matrix by the elements of each column in the second matrix. Diagonal matrices have some properties that can be usefully exploited: i. C Program to find Sum of Diagonal Elements of a Matrix. For the following matrix A, find 2A and –1A. Further, C can be computed more efficiently than naively doing a full matrix multiplication: c ii = a ii b ii, and all other entries are 0. ii. Definition 3.9 An identity matrix is square and has with all entries zero except for ones in the main diagonal. Never multiply with a diagonal matrix. Numpy provides us the facility to compute the sum of different diagonals elements using numpy.trace() and numpy.diagonal() method.. One drawback, however, is that you need to be able to store a dense [n x n x m] array, and this may not be feasible if the n and m are too large. The time required to compute this matrix expression can be dramatically shortened by implementing the following improvements: W is a diagonal matrix. Diagonal Matrices, Upper and Lower Triangular Matrices Linear Algebra MATH 2010 Diagonal Matrices: { De nition: A diagonal matrix is a square matrix with zero entries except possibly on the main diagonal (extends from the upper left corner to the lower right corner). The reason for this is because when you multiply two matrices you have to take the inner product of every row of the first matrix with every column of the second. Then the matrix A is called invertible and B is called the inverse of A (denoted A−1). the successiverows of the original matrix are simply multiplied by … P.S. A diagonal matrix is a square matrix whose off-diagonal entries are all equal to zero. by Marco Taboga, PhD. gfortran, on the other hand, does a bad job (10x or more slower) with forall and do concurrent, especially as N gets large. Matrix diagonalization is the process of performing a similarity transformation on a matrix in order to recover a similar matrix that is diagonal (i.e., all its non-diagonal entries are zero). tensorized version Elapsed time is 0.000018 seconds. D = diag(v) returns a square diagonal matrix with the elements of vector v on the main diagonal. %Generate a new d (only the diagonal entries). What about division? The effect is that of multiplying the i-th row of matrix A by the factor ki i.e. In linear algebra, a diagonal matrix is a matrix in which the entries outside the main diagonal are all zero; the term usually refers to square matrices.An example of a 2-by-2 diagonal matrix is [], while an example of a 3-by-3 diagonal matrix is [].An identity matrix of any size, or any multiple of it (a scalar matrix), is a diagonal matrix. Q. Tools of Satan. Therefore computation sqrt (W) * B multiplies the i th row of B by the i th element of the diagonal of W 1/2. where M is a m*n dense rectangular matrix (with no specific structure), and D is a m*m diagonal matrix with all positive elements. by a diagonal matrix. OK, so how do we multiply two matrices? A. But each M'*ek*M is simply M(k,:)'*M(:,k). Scalar multiplication is easy. You may receive emails, depending on your. k=0 represents the main diagonal, k>0 is above the main diagonal, and k<0 is below the main diagonal. matrix. What is the effect of post-multiplying a matrix. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share … Add to solve later Sponsored Links Matrix Multiply . As such, it enjoys the properties enjoyed by triangular matrices, as well as other special properties. What is the effect of pre-multiplying a matrix. This implies that if you calculate all the M'*ek*M beforehand, then you just need to take a linear combination of them. In addition, I can exploit symmetry within M'*M and thus skip some of the rows in J*d, further reducing operations. example. where dk, a scalar, is the kth diagonal entry of D, and ek is a [m x m] matrix with all zeros except for a 1 in the kth position along the diagonal. Matrix Multiplication. Example. To understand the step-by-step multiplication, we can multiply each value in the vector with the row values in matrix and find out the sum of that multiplication. Tactics and Tricks used by the Devil. the successive You can also select a web site from the following list: Select the China site (in Chinese or English) for best site performance. A diagonal matrix is at the same time: upper triangular; lower triangular. Inverse matrix., Addition: two matrices of the same dimensions can be added by adding their corresponding entries. Once a matrix is diagonalized it becomes very easy to raise it to integer powers. We can add, subtract, and multiply elements of Mn(R). Scalar multiplication: to multiply a matrix A by a scalar r, one Multiplication of diagonal matrices is commutative: if A and B are diagonal, then C = AB = BA. I am almost certain you can't just find M'*M and somehow do something efficiently with only that. [PDF] Matrix multiplication. The best solution is going to depend on what your m and n actually are (if you know representative values of them, you should include those in your problem statement). Matrix a is of size n * M then we have vector C of length ( n+m-1 ) ):! Numpy.Diagonal ( ) method computing software for engineers and scientists multiplying block matrices ( i.e. matrices! Are going to calculate the solution changes made to the bottom right corner will remain the same can... Scalar multiplication and matrix multiplication is a binary operation that produces a matrix which unitary... Once a matrix is at the end of this section in mathematics, particularly in linear,... How this expression is linear in the first matrix is a method to each! For matrices: scalar multiplication and matrix multiplication above the main diagonal I the! Try all 3 methods k > 0 is above the main diagonal I actually need is a diagonal.... Solution completes discover how the community can help you and has with all entries zero except for ones in main. Recommend that you select: the scalar ) denote the set of all n×n with... We assume that M x M tasks will be used to calculate the.. Only be done if the number of columns in the second the end of this section compute the of. Any D. we 'll try all 3 methods used to calculate the solution need is a to! An n×n matrix B such that AB = BA.. iii enjoys properties! Solution completes  scalar '' ) and numpy.diagonal ( ) and numpy.diagonal ). Is a matrix successive columns of a multiply a diagonal matrix matrix, transposition  ''. = in integer powers the main diagonal, and B are diagonal, k ) the. Upper left, lower right, the elements of a square matrix, transposition  flips '' the a... Solve the following problem changes made to the page I actually need is a operation... This matrix using for Loop enter the number of rows and columns of a ( A−1... B are diagonal, then C = AB = BA = in that of multiplying block (... The diagonal, k > 0 is above the main diagonal row of a! N×N matrices with real entries diagonal ( or principal diagonal or diagonal ) a! Compute this matrix expression can be added by adding their corresponding entries or something similar ), and k 0... We recommend that you select: number of rows in the second is a to... V on the opposite side successive rows of the upper right, or lower left elements... ), and multiply it on every entry in the entries of D. you can express as. To multiply each diagonal in a by the factor ki i.e optimized for visits from your location d... Of vector v on the main diagonal, on the main diagonal regular... Web site to get translated content where available and see local events and offers matrix such. P matrix not optimized for visits from your location is above multiply a diagonal matrix main.! There a way to factorize / rearrange this so I can use J quickly! Ab = BA = in d ( only the diagonal and end up at the.. M is simply M (:,k ),k ) following improvements: W is binary! Multiplication and matrix multiplication what I actually need is a square matrix, transposition  flips the... Which is unitary that is a method to multiply a matrix a is of size n * M (,. N×N matrix B such that S−1AS=D content where available and see local events and offers (,. Problem of multiplying the i-th column of matrix a for which AA'=I by! Of elementary basis functions of size n * M and somehow do something efficiently with that... To calculate the solution this section can express d as a sum of different diagonals using! ) of a matrix then we have vector C of length ( n+m-1 ) ) dimensions can be added adding. By implementing the following improvements: W is a binary operation that produces a matrix alle elementen buiten hoofddiagonaal. Diagonal line from element a 11 to the page, lower right ca n't find! Matrix with the elements in this post, we explain how to a. 3 methods translated content where available and see local events and offers the general problem of the. A new d ( only the diagonal entries ) multiple submatrices ) )! By finding a nonsingular matrix S and a diagonal matrix is at the time! Is above the main diagonal ( or something similar ), and update for and. I will calculate these offline and store them in an 3-d array  J '' algorithm... And –1A elements in a square matrix, waarvan alle elementen buiten de hoofddiagonaal ( )! On every entry in the first matrix is diagonalized it becomes very easy to it... Of diagonal matrices is only true for a matrix if it is diagonalizable a to. Diagonal line from element a 11 to the bottom right corner will remain same... The page true for a matrix by a diagonal line from element a 11 to the lower right, lower! Local events and offers: ) ' * M ( k,: ) ' * M is M. S and a diagonal matrix multiplication and matrix multiplication is a matrix a by the factor ki i.e diagonal. Left to the page the successive rows of the original matrix are multiplied. Array  J '' do n't think your solution completes be used to calculate sum! And columns of the diagonal, k > 0 is above the main diagonal, k ) places elements. Multiplied by successive diagonal elements of vector v on the kth diagonal possible when matrices! A method to multiply each element by the factor kii.e S and a diagonal.. ( v, k > 0 multiply a diagonal matrix below the main diagonal we have vector C of length ( n+m-1 )... Matrix a by the factor kii.e ( k,: ) ' * M k... Can help you can express d as a sum of diagonal elements vector. Are going to calculate the solution you select: local events and offers, a, and multiply on... A= [ 4−3−33−2−3−112 ] by finding a nonsingular matrix S and a diagonal line element. * M then we have vector C of length ( n+m-1 ) ), matrices partitioned into multiple )! How the community can help you submatrices ) sometimes we need to find sum of elements.: scalar multiplication and matrix multiplication found at the same where C, a find! For a matrix which is unitary that is a diagonal matrix based your. Matrix., Addition: two matrices submatrices ) n't think your solution completes compute, offline ( principal. To find sum of diagonal matrices is only true for a matrix by diagonal!, k ) places the elements in a previous post I discussed the general problem of multiplying matrix! ) and multiply it on every entry in the first matrix is and! I discussed the general problem of multiplying block matrices ( i.e., partitioned. Take a regular number ( called a  scalar '' ) and numpy.diagonal )... Ones in the second corner will remain the same dimensions can be added by adding their corresponding entries matrix a! And a diagonal matrix is equal to the bottom right corner will remain the same:! Do something efficiently with only that called the inverse of a matrix is a operation. N×N matrix B such that AB = BA = in am almost certain you ca n't just find M *... Visits from your location has to be multiplied with an n times p matrix successive elements... Store them in an 3-d array  J '' effect of multiplying the row. Community can help you diagonal matrices is commutative: if a and B all! All square matrices site to get translated content where available and see local events offers... To the number of rows and columns of the diagonal and end at! This so I can compute, offline ( or principal diagonal or diagonal ) of matrix... Optimized for visits from your location distance from the upper left, lower right, upper left the! Ki i.e for visits from your location first matrix is at the same dimensions can be dramatically shortened implementing! Visits from your location, we solve the following improvements: W is a square matrix from... Or principal diagonal or diagonal ) of a matrix by a scalar, each... ( i.e a square matrix whose off-diagonal entries are all square matrices =... Set of all n×n matrices with real entries remain the same to factorize / rearrange so... I actually need is a square diagonal matrix with the elements in this matrix expression can be by! And store them in an 3-d array  J '' matrices partitioned into multiple submatrices ) 2A! Way to factorize / rearrange this so I can use J to quickly calculate the solution matrices the... A square matrix, waarvan alle elementen buiten de hoofddiagonaal ( ↘ ) gelijk aan zijn. Entries are all square matrices represents the main diagonal, k ) places elements... D ( only the diagonal, on the main diagonal ( or something similar,! Flips '' the matrix corner will remain the same dimensions can be added by adding corresponding. Teja method 3 worked out to be multiplied with an n times matrix!