# Maximum number of squares touched by a line segment

Consider a square grid on the plane, with unit spacing. A line segment of integer length $$\L\$$ is dropped at an arbitrary position with arbitrary orientation. The segment is said to "touch" a square if it intersects the interior of the square (not just its border).

# The challenge

What is the maximum number of squares that the segment can touch, as a function of $$\L\$$?

# Examples

• L=3 $$\\ \, \$$ The answer is $$\7\$$, as illustrated by the blue segment in the left-hand side image (click for a larger view). The red and yellow segments only touch $$\6\$$ and $$\4\$$ squares respectively. The purple segment touches $$\0\$$ squares (only the interiors count).

• L=5 $$\\ \, \$$ The answer is $$\9\$$. The dark red segment in the right-hand side image touches $$\6\$$ squares (note that $$\5^2 = 3^2+4^2\$$), whereas the green one touches $$\8\$$. The light blue segment touches $$\9\$$ squares, which is the maximum for this $$\L\$$.

• The input $$\L\$$ is a positive integer.
• The algorithm should theoretically work for arbitrarily large $$\L\$$. In practice it is acceptable if the program is limited by time, memory, or data-type size.
• Input and output are flexible as usual. Programs or functions are allowed, in any programming language. Standard loopholes are forbidden.
• Shortest code in bytes wins.

# Test cases

Here are the outputs for L = 1, 2, ..., 50 (with L increasing left to right, then down):

 3    5    7    8    9   11   12   14   15   17
18   19   21   22   24   25   27   28   29   31
32   34   35   36   38   39   41   42   43   45
46   48   49   51   52   53   55   56   58   59
60   62   63   65   66   68   69   70   72   73

• No OEIS entry, apparently (maybe soon) Jul 10 at 15:35
• I really liked this one from a problem-solving perspective. Jul 10 at 23:59
• My Math.SE question will be interesting to y'all and relevant to this question Jul 11 at 9:03
• This reminds me of the problem of optimizing beam placement in FTL Jul 13 at 2:02
• This sequence is now in OEIS: A346232 Jul 15 at 0:02

# Vyxal, 7 bytes

*d⇩√3+⌊

Try it Online!

*       # Square
d      # Double
⇩     # Subtract 2
√    # Square root
⌊ # Floor

# Python 2, 27 bytes

lambda L:(2*L*L-2)**.5//1+3

Try it online!

A direct formula:

$$f(L) = \lfloor \sqrt{2 L^2-2}\rfloor + 3$$

Derivation

As noted by @Kirill L. and others, the optimal layout uses a near-diagonal line segment whose horizontal and vertical span are at least $$\(h,h)\$$ or $$\(h,h+1)\$$. We need the length-$$\L\$$ to cover at least this much distance using the Pythagorean theorem, plus some extra to reach into squares and hit 3 more.

This gives a result of either:

• $$\2h+3\$$ where $$\h\$$ is the greatest positive integer where $$\h^2+h^2 < L^2\$$, or
• $$\2h+4\$$ where $$\h\$$ is the greatest positive integer where $$\h^2+(h+1)^2 ,

whichever of these is larger. We want to combine these two cases into one.

Let's start by making the two cases look more similar. Note that the second case can be rewritten as

$$\2(h+\frac{1}{2})+3\$$, where $$\2(h+\frac{1}{2})^2 + \frac{1}{2} < L^2\$$

or as

$$\2h+3\$$, where $$\2h^2 + \frac{1}{2} < L^2\$$

where $$\h\$$ is a positve integer-and-a-half. The $$\2h^2 in the first case can be also be written as $$\2h^2 +\frac{1}{2} < L^2\$$, which is equivalent because both sides were integers. So, the cases now merge into:

$$\2h+3\$$ where $$\h\$$ is the greatest positive integer or half-integer where $$\2h^2 +1/2 < L^2\$$

Calling $$\2h=H\$$, this is:

$$\H+3\$$ where $$\H\$$ is the greatest positive integer where $$\2(H/2)^2 +1/2 < L^2\$$.

This inequality is $$\H^2 < 2L^2-1\$$, and since these are integers, this is the same as $$\H^2 \leq 2L^2-2\$$. The greatest such positive integer $$\H\$$ is then $$\\lfloor \sqrt{2 L^2-2}\rfloor\$$, so the final result is $$\ \lfloor \sqrt{2 L^2-2}\rfloor + 3 \$$.

• Fantastic. "We want to combine these two cases into one. Let's start by making the two cases look more similar." Did you know somehow this could be done at the outset (if so, how?), or did you just guess it might be possible, and start playing around? Jul 11 at 3:55
• @Jonah It was a guess, but it seemed to me like something like this should be possible because the two types of outputs lie nearly on the same approximate curve.
– xnor
Jul 11 at 4:06
• Wonderful! Simpler than the formula I had obtained Jul 11 at 10:41
• I intend to submit this sequence to OEIS. Your formula is simpler than the one I had (i+j+3 with i = floor(L/sqrt(2)), j=ceil(sqrt(L^2-i^2))-1, so I'd like to give you credit (in addition to linking this challenge). How can I do that? If you prefer we can go on using e-mail Jul 11 at 15:22
• I may also have to write a short paper to support the submission, in particular to justify that the optimal segment orientation is always (h,h) or (h,h+1). Are interested in collaborating on this? Please let me know either way Jul 12 at 8:55

# R, 79 77 bytes

L=scan();j=1:L;a=j*2^.5;b=Mod(j+j*1i+1i);3+2*sum(L>a)+max(a[L>a],b[L>b])%in%b

Try it online!

Note: as it turned out, this is completely destroyed by xnor's formula, which would be 23 bytes in R:

(2*scan()^2-2)^.5%/%1+3

However, I'm keeping the existing code as a reference to my original solution.

### Original explanation

In general case, the most squares will be touched when the line is going close to the diagonal orientation. Specifically, the number of touched squares will be equal to $$\2 \times x + 3\$$, where $$\x\$$ is the number of unit square diagonals fully covered by the line. The lengths of square diagonals are stored in a.

However, in some cases a better coverage can be achieved by deviating from the diagonal orientation. To account for this, we also store a vector b containing the lengths of diagonals of "deviated" rectangles of size $$\1 \times 2\$$ up to $$\L \times (L+1)\$$ (instead of squares up to $$\L \times L\$$). It looks like we need to count one additional touch in those cases where the maximal value of b that is still smaller than $$\L\$$ exceeds the analogous value from a.

For example, the first few diagonals are of length:

 1x1       2x2       3x3       4x4
1.414214  2.828427  4.242641  5.656854 ...

We can see that after going from $$\L = 3\$$ to $$\L = 4\$$ we have still covered only the 2nd term ($$\2 \times 2\$$ diagonal), it's not enough to reach the edge of the 3rd square, so we are not gaining any more touches. But if we switch to the "deviated" rectangles:

 1x2       2x3       3x4       4x5
2.236068  3.605551  5.000000  6.403124 ...

Here $$\L = 4\$$ now encompasses a larger value of 3.60..., which corresponds to ($$\2 \times 3\$$) rectangle. In this orientation we gain an extra touched square compared to the diagonal.

• I tested up to 100 and we get the same results Jul 10 at 21:00
• @LuisMendo Thanks for checking, now when I manually counted the first special case of L = 4, I also feel more confident about it Jul 10 at 21:40

# J, 28 bytes

-1 thanks to Jonah!

The optimal is always either the diagonal L, L with 3+2*L tiles crossed as noted by @Kirill L. or L, L+1, in which case an extra tile is crossed.

((>]+&.*:>:)+3+2*])[<.@%%:@2

Try it online!

• [<.@%%:@2 calculate L by dividing n by sqrt(2), then flooring
• 3+2*] 3+2*L
• ]+&.*:>: calculate length to L, L+1
• > … + if n is larger than this length, add 1

Because the lines have rational length n, and the diagonals irrational length L, we can always find an epsilon $$\L - n > 0\$$ to slide the line top-left to touch the 3 extra tiles, which justifies the 3+2*L.

L, L+2 will always be further away then the next diagonal L+1, L+1, as $$\L^2 + (L+2)^2 = 2L^2 + 4L + 4 > 2L^2 + 4n + 2 = (L+1)^2 + (L+1)^2\$$, so checking L, L+1 is enough.

• Nice J, and nice correctness argument. Jul 10 at 23:52
• ((>]+&.*:>:)+3+2*])]<.@%%:@2 for 28. Jul 10 at 23:55
• 15 using xnor's formula: 3+_2<.@%:@+2**: Jul 11 at 3:46

# Jelly,  18 17  8 bytes

-9 using xnor's mathematical simplification of the same method as the 17, below.

²Ḥ_2Æ½+3

A monadic Link that accepts a positive integer, $$\L\$$ and yields the maximal squares touched.

Try it online! Or see the test-suite.

### How?

²Ḥ_2Æ½+3 - Link: positive integer, L
²        - square -> L²
Ḥ       - double -> 2L²
_2     - subtract 2 -> 2L²-2
Æ½   - integer square-root -> ⌊√(2L²-2)⌋

17:

²H½Ḟð‘Ḥ‘++²ḤƊ‘½<ʋ

Try it online!

### How?

First finds the longest $$\(a,a)\$$ or $$\(a,a+1)\$$ diagonal that $$\L\$$ can cover with some to spare, then places the line along this diagonal, poking out at both ends, and shifts it in the $$\x\$$ direction to cover $$\2a+3+X\$$ squares where $$\X=1\$$ if the diagonal is $$\(a,a+1)\$$, otherwise $$\X=0\$$.

²H½Ḟð‘Ḥ‘++²ḤƊ‘½<ʋ - Link: positive integer, L
²                 - square -> L²
H                - halve -> L²/2
½               - square-root -> side of square with diagonal L
Ḟ              - floor -> a
ð             - new dyadic chain, f(a,L)...
‘            - increment -> a+1
Ḥ           - double -> 2a+2
‘          - increment -> 2a+3
²       -     square -> a²
+        -     (a) add (that) -> a+a²
Ḥ      -     double -> 2(a+a²)
‘    -   increment -> 2(a+a²)+1 = a²+(a+1)²
½   -   square-root -> diagonal length of (a,a+1)
<  -   less than (L)? -> 1 or 0 -> X

# Perl 5, 73 bytes

for$d(0,1){$w=0;1while$w**2+($d+$w++)**2<$_**2;$m+=2*$w-1+$d}$_=int$m/2+1  Try it online! Took @Kirill L.'s explanation and ran with it. Does two passes, without and with "deviation" in $d. The int$m/2+1 outputs the average (rounded up if .5) of those two passes, which will be the max of those two results. Reads the wanted length from stdin and prints max number of squares for that length. The following bash command outputs max number of squares touched for all lengths 1 to 50: for l in {1..50}; do echo$l | perl -pe \
'for$d(0,1){$w=0;1while$w**2+($d+$w++)**2<$_**2;$m+=2*$w-1+$d}$_=int$m/2+1'; echo -n " "; done 3 5 7 8 9 11 12 14 15 17 18 19 21 22 24 25 27 28 29 31 32 34 35 36 38 39 41 42 43 45 46 48 49 51 52 53 55 56 58 59 60 62 63 65 66 68 69 70 72 73  # Japt, 10 bytes Ò2nU²Ñ ¬ÄÄ  Try it Ò2nU²Ñ ¬ÄÄ :Implicit input of integer U Ò :Negate the bitwise NOT of (i.e., floor and increment) 2n : Subtract 2 from U² : U squared Ñ : Times 2 ¬ : Square root ÄÄ :Add one twice  # JavaScript (Node.js), 20 bytes n=>(2*n*n-2)**.5+3|0  Try it online! Shamelessly copies the idea from xnor's answer # ><>, 27 bytes :*2*2-0v :})?v1+>::*{ ;n+2<  Try it online! Xnor's formula, but in a language with neither square root nor rounding operations. Instead, it does the equivalent thing of finding the least square number larger than $$\2L^2 - 2\$$ # Wolfram Language (Mathematica), 20 bytes (14 characters) ⌊√(2#^2-2)⌋+3&  Try it online! Shamelessly translating xnor's Python answer. # Java (JDK), 28 bytes L->L+=Math.sqrt(2*L*L-2)+3-L  Try it online! Same as everyone, I guess, cheers to xnor! #### Same length as: L->(int)Math.sqrt(2*L*L-2)+3  Try it online! # Retina, 43 29 bytes .+ **2* (^_|\1__)*__+ __$#1*

Try it online! Link is to test suite that generates the results from 1 to the input. Explanation: Now using @xnor's formula.

.+
**2*

Double the square of L and convert it to unary.

(^_|\1__)*__+
__$#1*  Subtract 2 and take the integer square root. This is based on @MartinEnder's comment to my Retina answer to It's Hip to be Square but without the leading ^ anchor as the subtraction of 2 guarantees a single match.   Add a final 1 and convert to decimal. Previous 43-byte solution based on @KirillL.'s answer: .+ ** ((^(_)|\2__)*)\1(\2_(_))?.+ __$2$3$5

Try it online! Link is to test suite that generates the results from 1 to the input. Explanation:

.+
**

Square L and convert it to unary.

((^(_)|\2__)*)\1(\2_(_))?.+

Find the largest n where 2n²<L², thereby dividing L by √2. Additionally, try to match a further 2n+1 (\2 contains 2n-1), because a rectangle of dimensions n by n+1 has diagonal √(2n²+2n+1). Match at least a further 1 so that the inequality is strict, but also because it guarantees a single match.

__$2$3$5  Calculate 2+2n, plus add another 1 for the rectangular case. Note that $2$3 is used because \2 doesn't actually contain 2n-1 when n=0, but $2\$3 is always 2n.

Add a final 1 and convert to decimal.

# Stax, 7 bytes

é╟φQRl:

Run and debug it

# 05AB1E, 7 bytes

n·Ít3+ï

Port of @xnor's Python answer, so using the same formula:

$$f(L) = \lfloor\sqrt{L^2+2}+3\rfloor$$

Explanation:

n        # Square the (implicit) input-integer
·       # Double it
Í      # Subtract it by 2
t     # Take the square-root of that
3+   # Increase it by 3
ï  # Truncate/floor it to an integer
# (after which the result is output implicitly)

# MathGolf, 7 bytes

²∞⌡√3+i

Port of @xnor's Python answer, so using the same formula:

$$f(L) = \lfloor\sqrt{L^2+2}+3\rfloor$$

Try it online.

Explanation:

²        # Square the (implicit) input-integer
∞       # Double it
⌡      # Subtract it by 2
√     # Take the square-root of that
3+   # Increment it by 3
i  # Convert it to an integer
# (after which the entire stack is output implicitly as result)


1. Complex number equation

The question:
Show that $\displaystyle |z_1 + z_2|^2 + |z_1 - z_2|^2 = 2|z_1|^2 + 2|z_2|^2$, for all complex numbers $\displaystyle z_1$ and $\displaystyle z_2$.

I tried getting the LHS to match the RHS, but I've done something wrong. My attempt involved factorising using the difference of two squares, but it doesn't seem to help. Any assistance would be great.

2. Originally Posted by Glitch
The question:
Show that $\displaystyle |z_1 + z_2|^2 + |z_1 - z_2|^2 = 2|z_1|^2 + 2|z_2|^2$, for all complex numbers $\displaystyle z_1$ and $\displaystyle z_2$.

I tried getting the LHS to match the RHS, but I've done something wrong. My attempt involved factorising using the difference of two squares, but it doesn't seem to help. Any assistance would be great.
The first page of http://www.math.ca/crux/v31/n8/public_page502-503.pdf contains the expansion of $\displaystyle |z_1+z_2|^2$. Similarly expand $\displaystyle |z_1-z_2|^2$ and add them.

3. Originally Posted by Glitch
The question:
Show that $\displaystyle |z_1 + z_2|^2 + |z_1 - z_2|^2 = 2|z_1|^2 + 2|z_2|^2$, for all complex numbers $\displaystyle z_1$ and $\displaystyle z_2$.

I tried getting the LHS to match the RHS, but I've done something wrong. My attempt involved factorising using the difference of two squares, but it doesn't seem to help. Any assistance would be great.
Write $\displaystyle \displaystyle z_1$ and $\displaystyle \displaystyle z_2$ in terms of their real and imaginary parts and simplify...

4. Ahh, I forgot about that relation. Thank you.

5. Originally Posted by Glitch
The question:
Show that $\displaystyle |z_1 + z_2|^2 + |z_1 - z_2|^2 = 2|z_1|^2 + 2|z_2|^2$, for all complex numbers $\displaystyle z_1$ and $\displaystyle z_2$.
Here is a different approach.
Recall $\displaystyle |z|^2=z\cdot\overline{z}$ and $\displaystyle \overline{z\pm w}=\overline{z}\pm\overline{w}$.
So $\displaystyle |z+w|^2=(z+w)\cdot\overline{(z+w)}=(z+w)\cdot(\ove rline{z}+\overline{w})$.
$\displaystyle =z\cdot\overline{z}+z\cdot\overline{w}+w\cdot\over line{z}+w\cdot\overline{w}$
$\displaystyle =|z|^2+z\cdot\overline{w}+w\cdot\overline{z}+|w|^2$

Do that for $\displaystyle |z-w|^2$ and add.

6. Originally Posted by Plato
Here is a different approach.
That's what alexmahone suggested. I ended up solving it that way.


If a fair die is rolled 3 times, what are the odds of getting an even number on each of the first 2 rolls, and an odd number on the third roll?

If a fair die is rolled 3 times, what are the odds of getting an even number on each of the first 2 rolls, and an odd number on the third roll?

I think the permutations formula is needed i.e. $$n!/(n-r)!$$ because order matters but I'm not sure if n is 3 or 6 and what would r be?

Any help would be much appreciated!

Let's calculate the probability, then convert that to odds.

On a fair die, half the numbers are even and half the numbers are odd. So, the probability for a single roll of getting an even number or an odd number is $$\dfrac{1}{2}$$.

The probability for a specific roll are unaffected by previous rolls, so we can apply the product principle and multiply probabilities for each roll. Each roll has probability of $$\dfrac 1 2$$ of obtaining the desired result. So, we have:

$$P(E,E,O) = \dfrac 1 2 \cdot \dfrac 1 2 \cdot \dfrac 1 2 = \dfrac 1 8$$

Now, the probability of that not happening is $$1-\dfrac 1 8 = \dfrac 7 8$$

So, the odds are 7:1 against the desired outcome.

I think you might be over complicating things.

It has to be even on the first two, the probability of this is $$\frac{1}{2} \times \frac{1}{2} = \frac{1}{4}.$$

The probability of odd on the third roll is also $$\frac{1}{2}$$ so your final probability is $$\frac{1}{8}.$$

• This is simpler. – Snowcrash Sep 21 at 14:44
• ... this is using odds... not probability – Jason Kim Sep 22 at 3:36
• @jason Kim what do you think the distinction is..? – MRobinson Sep 22 at 7:59
• Odds for is (prob)/(1-prob) which demonstrates the difference... – Jason Kim Sep 24 at 0:58
• @JasonKim if the probability is $\frac{1}{8}$ then the odds are $1$ in $8$. If you want to write the odds like a betting shop then you'll have $1:7$. I struggle to see how you believe I have used odds and not probability. – MRobinson Sep 24 at 7:32

Given a fair die, the probability of any defined sequence of three evens or odds is the same, namely, $$1/2 \times 1/2 \times 1/2 = 1/8$$. So the odds are $$7$$ to $$1$$ against.

Assuming the die is just marked even and odd rather than with numbers, there are eight orderings. They range from all odd to all even: OOO, OOE, OEO, EOO, OEE, EOE, EEO, EEE. In your formula:

$$\frac{n!}{(n-r)!}$$

You are missing that you don't care about the orders of the duplicates. So you need

$$\frac{n!}{(n-r)!r!}$$

The $$n$$ is the total number of rolls, the $$r$$ is the number of either evens or odds (it's symmetric). But to get the total number of orderings, you need to add these:

$$\sum\limits_{r=0}^n\frac{n!}{(n-r)!r!}$$

Now substitute 3 for $$n$$.

$$\sum\limits_{r=0}^3\frac{3!}{(3-r)!r!}$$

Unrolling that, we get

$$\frac{3!}{3!0!} + \frac{3!}{2!1!} + \frac{3!}{1!2!} + \frac{3!}{0!3!}$$

or

$$1 + 3 + 3 + 1$$

So we have one all odds, three with one even, three with two evens, and one all even. That's eight total.

Another way of thinking of this is that there is only one ordering of all odd numbers or all even numbers while there are three places where the lone odd or even number can be.

Of those eight, how many fit your parameters? Exactly one, OOE. So one in eight or $$\frac{1}{8}$$.

As others have already noted, you could get that much more easily by simply figuring that you have a one in two chance of getting the result you need for each roll. There's three rolls, so $$(\frac{1}{2})^3 = \frac{1}{8}$$.

If you want to treat 1, 3, and 5 as different values and 2, 4, and 6 as different values, you can. But it is much easier to think of them as just odd or even. Because you don't want to try write this out for $$6^3 = 216$$ orderings. And in the end, you will get the same basic result. You will have twenty-seven OOE orderings, which is again one eighth of the total. This is because there are three possible values for each, 1, 3, and 5 for the two odds and 2, 4, and 6 for the even. And $$\frac{27}{216} = \frac{1}{8}$$.

Permutations leads you down a harder path. It's easier to think just in terms of probability or even ordering.

All of the above or below :-} answers are correct that is 50:50 for each throw so your "formula" is

n (2 -1):1 against where n is the number of throws

• Welcome to MathSE. Please read this tutorial on how to typeset mathematics on this site. – N. F. Taussig Sep 21 at 22:08


Given $f(x)=x(x-1)(x-2)…(x-10)$ what is the derivative $f'(0)$?

$$f: \Bbb R \to \Bbb R; x \mapsto f(x)=x(x-1)(x-2)\cdots(x-10)$$ Evaluate $f'(0)$!

I've tried to set the factors apart, but I only know that $(fg)'=f'g+fg'$. I don't know how I should apply that rule for any $n$ amount of factors. I also thought of actually doing the multiplication, but I don't know what shortcut I should use, and multiplicating one after the other takes extremely long.

• look at the edited text to see how to make your equations looks nice – Surb Sep 12 '16 at 19:47
• Do you want $f^{\prime}(0)$ factorial, or are you just very excited about $f^{\prime}(0)$? – carmichael561 Sep 12 '16 at 19:47
• @Surb thanks, I'll take a look at it! I think Jack gave me the perfect answer below, thanks! – bp99 Sep 12 '16 at 19:52
• Another method: logarithmic differentiation. – GEdgar Sep 12 '16 at 19:53
• 10!! looks like a super awesome number – cronos2 Sep 12 '16 at 20:01

Let $g(x) = x$ and $h(x) = (x-1)\cdots (x-10)$. Then $f'(x) = g(x) h'(x) + g'(x)h(x)$. Since $g(0)=0$ and $g'(0)=1$, we have $$f'(0) = h(0) = (-1)(-2)\cdots (-10) = 10!$$

• Your answer was the most intuitive for me, thank you! It's the simplest IMO and I've only begun calculus :) – bp99 Sep 12 '16 at 20:19

Apply the definition: $$f'(0)=\lim_{x\to0}\frac{f(x)-f(0)}{x-0}= \lim_{x\to0}\,(x-1)(x-2)\dots(x-10)=10!$$ More generally, if $f(x)=x(x-1)\dots(x-n)$, the same argument shows $$f'(0)=(-1)^n\cdot n!$$

• Interestingly, the definition of the derivative is useful at times! – Wojowu Sep 12 '16 at 20:07
• @Wojowu Who might have suspected it? ;-) – egreg Sep 12 '16 at 20:12

Hint: A polynomial is always an entire function, and in a neighbourhood of the origin: $$x(x-1)\cdot\ldots\cdot(x-10) = 10!\,x+O(x^2)$$ hence $$\frac{d}{dx}\left. x(x-1)\cdot\ldots\cdot(x-10)\right|_{x=0} = \color{red}{10!}.$$

Welcome to Math SE. To format your question you can use LaTeX.

Now coming to your question, the derivative of a product is just the sum of the $n$ products where only one of the members is differentiated. In your case

$((x)... (x-10))' = [(x-1)...(x-10)]+[x(x-2)...(x-10)]+...+[x(x-1)...(x-9)]$

Note that all but the first expression will evaluate to $0$ at $x=0$ since you're multiplying by 0 ($x$) so $f'(0)=(-1)(-2)...(-10)=10!$

• Thanks for your answer! However, I don't fully understand this part, unfortunately: $((x)... (x-10))' = [(x-1)...(x-10)]+[x(x-2)...(x-10)]+...+[x(x-1)...(x-9)]$ How does this work exactly? – bp99 Sep 12 '16 at 20:06
• @bertalanp99 Try it by hand with just three terms. Differentiate $(x-1)(x-2)(x-3)$ using the product rule (twice). The form should pop out. Your question just adds more terms in the product. – John Sep 12 '16 at 20:14

There is an $n$-term version of the product rule that is definitely worth knowing about. You'll see the pattern from the $n = 3$ case. If $f(x) = f_1(x) f_2(x) f_3(x)$, then $$f'(x) = f_1'(x) f_2(x) f_3(x) + f_1(x) f_2'(x) f_3(x) + f_1(x) f_2(x) f_3'(x).$$ (Do you see what the formula would be for a product of four functions?)

In your case, $f'(x)$ is a sum of $11$ terms, and all but one of those terms vanish when you plug in $x = 0$.

Richard Feynman made a big deal about the usefulness of this $n$-term product rule in The Feynman Tips on Physics.

More generally, if $f(x) =\prod_{k=1}^n (x-a_k)^{b_k}$, then $\ln f(x) =\sum_{k=1}^n b_k \ln(x-a_k)$.

Differentiating, $\dfrac{f'(x)}{f(x)} =\sum_{k=1}^n \dfrac{b_k}{x-a_k}$, so $f'(x) =f(x)\sum_{k=1}^n \dfrac{b_k}{x-a_k}$.

Setting $x=0$,

$\begin{array}\\ f'(0) &=f(0)\sum_{k=1}^n \dfrac{b_k}{-a_k}\\ &=\prod_{j=1}^n (-a_j)^{b_j}\sum_{k=1}^n \dfrac{b_k}{-a_k}\\ &=\sum_{k=1}^n b_k(-a_k)^{b_k-1}\prod_{j=1, j \ne k}^n (-a_j)^{b_j}\\ \end{array}$

If $a_k = k-1$ and $b_k = 1$ as in your case,

$\begin{array}\\ f'(0) &=\sum_{k=1}^n \prod_{j=1, j \ne k}^n (-j+1)\\ &=(-1)^{n-1}\sum_{k=1}^n \prod_{j=1, j \ne k}^n (j-1)\\ &=(-1)^{n-1}\left(\prod_{j=2}^n (j-1)+\sum_{k=2}^n \prod_{j=1, j \ne k}^n (j-1)\right)\\ &=(-1)^{n-1}(n-1)! \qquad\text{since all terms with }k\ge 2 \text{ have j=1 so are zero}\\ \end{array}$

• Why would anyone downvote this answer must be a deep mistery. It is correct, it gives the correct answer in the particular case asked by the OP and also, for whoever is interested, it gives a nice though slightly abstract development to deal with these things. And anyone aspiring to cope with mathematics at any level above $\;2\cdot2=4\;$ cannot get scared of a little abstraction. +1 – DonAntonio Sep 12 '16 at 20:28
• @DonAntonio I'm not the downvoter. The answer glosses over two facts: the first is that taking the logarithm is not really possible (but it's a formal method, so nothing really bad if we know what we're doing). However, the computation is done assuming $a_k\ne0$; it can easily be adjusted, though, with doing a limit or some simpler trick. – egreg Sep 12 '16 at 20:52
• @egreg You're right, indeed. +1 – DonAntonio Sep 12 '16 at 20:55
• In my answer, I separated out the case $a_k = 0$ in the first term; this caused all the other terms to vanish at $x = 0$. – marty cohen Sep 12 '16 at 21:42


# The Case of the Disappearing Derivative

#### (A new question of the week)

An interesting question we received in mid-January concerned two implicit derivative problems with an unusual feature: the derivative we are seeking disappears! How do you track down such elusive quarry? Each case is a little different.

## Problem 1: The danger in division

Amia asked two questions, which I will separate to make the discussions easier to follow. Here is the first:

Hi Dr Math,

I have a question about finding the value of the derivative, I need your help.

Thank you.

This is an example of implicit differentiation, in which a relation (which we want to think of as $$y = f(x)$$ though it is typically not a function) has been defined implicitly as representing any ordered pair $$(x, y)$$ that satisfies the equation $$\tan(xy)=xy$$. He has differentiated both sides of the equation with respect to x, following the chain rule and the product rule, and obtained $$\sec^2(xy)(xy’+y)=xy’+y$$, which he wants to solve for $$y’$$, which will be a function of x and y. But something odd has happened: $$y’$$ has disappeared entirely, so there is nothing to solve for! Was the division that led to this situation invalid? Is the resulting equation valid?

In dividing by xy’ + y, you are assuming that xy’ + y is non-zero; and in the process you are losing the derivative completely! In effect, your answer seems to say that if the derivative can be determined at all, then sec2(xy) must equal 1. That’s the opposite of what a solution should say, which would be that if something is true, then the derivative has some particular value.

Instead, I would either distribute or factor the equation you got and isolate y’ as usual; when you do that, you will get an implicit derivative on the condition that sec2(xy) is not 1.

In general, when you are tempted to divide by a variable while solving, the better thing to do is to factor, which retains all relevant information rather than silently assuming something you may not want to assume.

After solving both problems, it will be interesting to try graphing the equations; I find that Desmos (almost) graphs both nicely, and the result is interesting to compare with what you find about the equations. But first try graphing by hand, at least to the extent of thinking about what kind of curve each must be. This will be worth discussing!

The warning against division is standard in algebra; an example I often use is that in solving $$x^2=4x$$ if we divided by x, we would get $$x = 4$$ and miss the solution $$x=0$$; whereas if we rearrange and factor, we get $$x^2-4x=0\\x(x-4)=0\\x=0\text{ or }x=4$$ which is correct. The error was in implicitly assuming that the x we divide by is non-zero, when in fact zero is one of our solutions.

Similarly, in our problem, it will turn out that the $$(xy’+y)$$ that he divided by, when it is zero, leads to the answer we are looking for.

### Getting the derivative

Amia first showed me the graphs, which I’ll hold for later, and then showed the work I’d described:

There’s a little slip in the last line; it should say $$y’=\frac{y(1-\sec^2(xy))}{x(\sec^2(xy)-1)}=-\frac{y}{x}$$

This is good, though I would add that this is valid as long as sec2(xy) ≠ 1. This turns out to have no effect.

This is because the cancellation in that last line is valid only if $$\sec^2(xy)-1$$ is not zero; if it is, then the intermediate form is just 0/0 and can’t be evaluated. In that case, we have to back up a line and observe that the equation is $$0=0$$, which tells us nothing. And backing up still more, if we replace $$\sec^2(xy)$$ in the second line of the work with 1, we already get a tautology (an equation that is always true). There is no way to determine $$y’$$ in that case.

Now, why did I say that this restriction will not affect the final result? Because if $$\sec^2(xy)=1$$, then $$xy=n\pi$$ for some integer n; but then $$\tan(xy)=0$$, and  our curve is $$xy=0$$, which is just the x– and y-axes. Hold that thought while we explore the graph.

Now, we’ve found that the derivative is $$y’=\frac{-y}{x}$$.

### Exploring the graph

Do you know another function that has the same derivative (that is, that satisfies this differential equation)? It’s y = k/x, a family of hyperbolas — which is just what the graph you showed looks like (for some specific values of k):

(Desmos does a remarkable job graphing such a tricky equation, but it struggles, and you have to imagine those dotted lines being filled in to make complete curves.)

This kind of hyperbola, called rectangular hyperbolas because of the right angle between the asymptotes (the axes), has the equation $$xy=k$$, and differentiating that implicitly we get $$y+xy’=0$$, so that $$y’=-\frac{y}{x}$$, the same as our curve. All we need to know is, what values of k are valid?

I’d suggested that we would learn a lot by trying to work out the graph ourselves rather than just plugging the equation into a website and seeing what it looks like all at once. We’ve just taken the first step, by observing that it is some set of hyperbolas, based on the derivative. We can continue by finding k:

Now supposed we wanted to graph the function by hand. One way to analyze it would be to let u = xy, so the equation is tan(u) = u. This has as its solution certain discrete values of u:

Here I plotted $$y=\tan(u)$$ in red, and $$y=u$$ in blue, so that the intersections (gray dots) are the solutions. We can’t solve this analytically and exactly, but the graph tells us that they are about $$u=0,\pm 4.493, \pm 7.725, \dots$$.

And our function therefore is equivalent to xy = k for those values of k, which is exactly the family of hyperbolas we’ve seen. Here I have overlaid two particular hyperbolas, namely xy = 4.493 (red) and xy = -7.725 (green)

That is very satisfying.

Now, if you wish, you can think about when sec2(xy) = 1.

This, as we saw above, corresponds to the x– and y-axes (the case $$k=0$$), and no other points on this graph. At those points, the derivative is 0 (when $$y=0$$, and our formula for the derivative is correct) or undefined (when $$x=0$$, and our formula for the derivative is effectively correct, yielding “infinity”). So the answer to the problem is, in fact, $$y’=\frac{-y}{x}$$

## Problem 2: Getting specific too soon

Here is the second question, which we actually discussed interleaved with the first:

We can tell from the form of the equation that this is a conic section, and could further analyze it. But our goal is to find the derivative at a specific point on the curve. (This time we can actually solve for y and find these points given only x, which we couldn’t do in the first problem.) It should be observed that we would normally expect to find two points (if any), since we solved a quadratic equation; so this is a special point, and that alone might suggest what to expect.

But Amia has correctly differentiated and plugged in the given point, but again found that $$y’$$ disappeared from the equation. All we have left is a false equation, $$4=0$$. Does that mean “no solution”?Would it mean something different if you got a true equation like $$4=4$$?

(By the way, I have to admit I initially misread that as “$$y=0$$”, which would have meant something interestingly different. But Amia is consistent in distinguishing y from 4. Clear writing is important in math, but because people write differently, they can misread your writing even when you do everything right …)

To this, I answered:

You have correctly found that when x=1, y=-1; then you implicitly differentiated and substituted values before solving for y’, finding that y’ is eliminated, similarly to the other problem. This time you found that an inconsistent equation results. We can’t conclude (yet) that y’ doesn’t exist; but it does suggest that x=1 will be a special case of some sort.

Again, I would isolate y’ before substituting, which will result in something that is interesting. See what you find.

### Getting the derivative

Amia showed the graph, showing the specialness of this point, and then showed the new work I had suggested:

I see that the curve has a vertical tangent at the point (-1,1).

By solving for $$y’$$ in the general case, we get a better sense of the behavior of the graph, and see how things fail at the special point. In general, $$y’=-\frac{3x+y}{x+y}$$ This is undefined when $$x+y=0$$, which includes our special point $$(1,-1)$$ and its opposite, $$(-1,1)$$. But for other points nearby, the slope is defined, and we will be dividing by a very small number, making a steep slope, fitting our expectations for a vertical tangent. In particular, if x and y change just a little, we end up with something near -2 on top but a very small number, either positive or negative, on the bottom, resulting in a respectively negative or positive, near-infinite slope.

(But be careful – we can’t just think about the limit as we approach the point, because we have to approach along the curve, not just from any direction. Moreover, it turns out, though we can’t see it in the equations, that x can’t be greater than 1! There are many details about working with curves that we didn’t, and won’t here, touch on!)

### Exploring the graph

Again, this is good; in particular, we see that the requested derivative fails to exist in such a way that it indicates a vertical slope (approaching +infinity from one side and -infinity from the other). And that, again, agrees with the graph, as you indicated:

This is a rotated ellipse; here are its axes:

If in your initial work you had been given a different value of x (an interesting one is √(2)/2, which gives the vertices and covertices), then when you solved for y and plugged the values into the derivative, everything would have worked correctly. But this example shows that in general it is better to keep the variables unknown until the end.

These were both very interesting!

To talk more about the rotated ellipse, such as how I found the tilted axes, would take us too far afield. But if this made you curious, here is a thorough textbook explanation from Libretexts.

But let’s do what I suggested, and try taking $$x=\frac{\sqrt{2}}{2}$$. First, we find y: $$3x^2+2xy+y^2=2\\ 3\left(\frac{\sqrt{2}}{2}\right)^2+2\left(\frac{\sqrt{2}}{2}\right)y+y^2=2\\ \frac{3}{2}+\sqrt{2}y+y^2=2\\ y^2+\sqrt{2}y-\frac{1}{2}=0\\ 2y^2+2\sqrt{2}y-1=0\\ y=\frac{-2\sqrt{2}\pm\sqrt{16}}{4}=\pm 1-\frac{\sqrt{2}}{2}$$ So the two points we get are $$(0.707,-1.707)$$ and $$(0.707,0.293)$$.

Now, using the formula we got for the derivative, we get $$y’=\frac{-(3x+y)}{x+y}\\ =\frac{-(3\frac{\sqrt{2}}{2}\pm 1-\frac{\sqrt{2}}{2})}{\frac{\sqrt{2}}{2}\pm 1-\frac{\sqrt{2}}{2}}\\ =\frac{-(\sqrt{2}\pm 1)}{\pm 1}=-\sqrt{2}-1,\sqrt{2}-1$$ These are the same as the slopes of the axes, $$y=\left(-1\pm\sqrt{2}\right)x$$.

This site uses Akismet to reduce spam. Learn how your comment data is processed.


If it has four lines of reflectional symmetry, it is a square. Anyone can earn An error occurred trying to load this video. Also, area is altitude times side length and 4x10=5x8. To learn more, visit our Earning Credit Page. A parallelogram has rotational symmetry of order 2 (through 180°) (or order 4 if a square). We'll then apply this formula to two examples that show up in the real world. Given The perimeter of the parallelogram = 50 cm The length of one side is 1 cm longer than the length of the other. The area of a parallelogram is the "base" times the "height." Solution: False Given, parallelogram in which base = 10 cm and altitude = 3.5 cm Area of a parallelogram = Base x Altitude = 10 x 3.5 = 35 cm 2. You can use the formula for calculating the area of a parallelogram to find its height. is it possible to create an avl tree given any set of numbers? Calculate certain variables of a parallelogram depending on the inputs provided. One of its sides is congruent (has the same length) to the parallelogram’s altitude. Truesight and Darkvision, why does a monster have both? That's great, because you just learned how to find the height of a parallelogram. Solution. Can a parallelogram have whole-number lengths for all four sides and both diagonals? The base and the corresponding altitude of a parallelogram are 10 cm and 3.5 cm, respectively. That is why you can simply multiply By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. Enrolling in a course lets you earn progress by passing quizzes and exams. - Definition and Properties, Measuring the Area of a Rhombus: Formula & Examples, Kites in Geometry: Definition and Properties, Rectangles: Definition, Properties & Construction, Measuring the Area of a Rectangle: Formula & Examples, Biological and Biomedical Create your account. Parallelogram has sides with lengths of 10 centimeters and 20 centimeters, What is the height in centimeters? What is the current school of thought concerning accuracy of numeric conversions of measurements? If you know the area, A, and the base, b, of a parallelogram, you can find its height using the following formula: Alright, you now know how to find the height of a parallelogram given its area and base. A parallelogram is a quadrilateral in which opposite sides are parallel and have the same length. what is the length of this altitude, if its perimeter is 50 cm, and the length of one side is 1 cm longer than the length of the other? Parallelogram on the same base and having equal areas lie between the same parallels. A = bh A = 16,500 light-years × 10,000 light-years A = 165,000,000 light-years 2. 's' : ''}}. Areas Of Parallelograms And Triangles Parallelograms on the same base and between the same parallels are equal in area. Formally, the shortest line segment between opposite sides. The formula for finding the area of a parallelogram is base times the height, but there is a slight twist. If you know the base, b, and the height, h, of a parallelogram, you can find the area of the parallelogram using the following formula: You can use the formula for calculating the area of a parallelogram to find its height. Not sure what college you want to attend yet? The altitude (or height) of a parallelogram is the perpendicular distance from the base to the opposite side (which may have to be extended). The area of a parallelogram is equal to … The architect is thrilled that his building will be classified as a skyscraper since it is taller than 164 feet. Better user experience while having a small amount of content to show. A parallelogram is a quadrilateral, or four-sided shape, with two sets of parallel sides. If angles a and b are angles of a parallelogram, what is the sum of the measures of the two angles? Parallelograms on the same base and between the same parallel are equal in area. MathJax reference. Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Sociology 110: Cultural Studies & Diversity in the U.S. CPA Subtest IV - Regulation (REG): Study Guide & Practice, Properties & Trends in The Periodic Table, Solutions, Solubility & Colligative Properties, Electrochemistry, Redox Reactions & The Activity Series, Creating Routines & Schedules for Your Child's Pandemic Learning Experience, How to Make the Hybrid Learning Model Effective for Your Child, Distance Learning Considerations for English Language Learner (ELL) Students, Roles & Responsibilities of Teachers in Distance Learning, Component-Level Design: Definition & Types, Long Way Down by Jason Reynolds: Summary & Ending, The Canterbury Tales: Courtly Love, Romance & Marriage, Johnny Cade in The Outsiders: Character Analysis & Quotes, Quiz & Worksheet - DES & Triple DES Comparison, Quiz & Worksheet - Occurrence at Owl Creek Bridge POV & Tone, Flashcards - Real Estate Marketing Basics, Flashcards - Promotional Marketing in Real Estate, Environmental Science 101: Environment and Humanity, FTCE Earth & Space Science 6-12 (008): Test Practice & Study Guide, Intro to Excel: Essential Training & Tutorials, Prentice Hall Biology: Online Textbook Help, The History of Counseling and Psychotherapy: Help and Review, Quiz & Worksheet - Genetic Research with Vertebrate Model Organisms, Quiz & Worksheet - Operations with Decimals, Quiz & Worksheet - Fayol's Theories on Staff Management & Worker Satisfaction, Quiz & Worksheet - ERG Theory & Employee Motivation, Quiz & Worksheet - Homeotic Genes & Drosophila Development, Poe's The Fall of the House of Usher: Summary and Analysis, What Is Plantar Fasciitis? Can Pluto be seen with the naked eye from Neptune when Pluto and Neptune are closest? The area of the parallelogram is 30 cm^(2). Thanks for contributing an answer to Mathematics Stack Exchange! Is it possible to generate an exact 15kHz clock pulse using an Arduino? courses that prepare you to earn In this lesson, we'll derive a formula that allows us to find the height of a parallelogram given its base and area. The formula is: A = B * H where B is the base, H is the height, and * means multiply. Altitude is 8.5 cm. Diary of an OCW Music Student, Week 4: Circular Pitch Systems and the Triad, Types of Cancer Doctors: Career Overview by Specialization, Be a Computer Science Engineer: Career Information and Requirements, How to Become a Health Data Analyst: Step-by-Step Career Guide, When Is the Best Time to Transfer Schools, Education-Portalcoms Peoples Choice Award Winner Most Interactive, Career Vs Family Do You Really Have to Choose, Foundations of Geometry: Tutoring Solution, Introduction to Geometric Figures: Tutoring Solution, Properties of Triangles: Tutoring Solution, Triangles, Theorems and Proofs: Tutoring Solution, Parallel Lines and Polygons: Tutoring Solution, How to Find the Height of a Parallelogram, Circular Arcs and Circles: Tutoring Solution, Introduction to Trigonometry: Tutoring Solution, Prentice Hall Algebra 2: Online Textbook Help, High School Trigonometry: Homework Help Resource, High School Trigonometry: Tutoring Solution, NY Regents Exam - Integrated Algebra: Test Prep & Practice, High School Trigonometry: Help and Review, Statistics for Teachers: Professional Development, Quantitative Analysis for Teachers: Professional Development, Business Math for Teachers: Professional Development, Prentice Hall Geometry: Online Textbook Help, McDougal Littell Geometry: Online Textbook Help, Using the Minimum-Cost Method to Solve Transportation Problems, Using the Transportation Simplex Method to Solve Transportation Problems, Compound Probability: Definition & Examples, Quiz & Worksheet - Simplifying Polynomial Functions, Quiz & Worksheet - Compounding Functions and Graphing Functions of Functions, Quiz & Worksheet - How to Graph Basic Functions, Quiz & Worksheet - How to Understand and Graph the Inverse Function, Algebra II - Trigonometry: Help and Review, Algebra II - Basic Arithmetic Review: Tutoring Solution, Algebra II - Complex and Imaginary Numbers Review: Tutoring Solution, Algebra II - Exponents and Exponential Expressions Review: Tutoring Solution, Algebra II - Systems of Linear Equations: Tutoring Solution, California Sexual Harassment Refresher Course: Supervisors, California Sexual Harassment Refresher Course: Employees. To define the height is 8 cm, but the height, perimeter and area two. The High school Geometry: Tutoring Solution page to learn more, our! Of content to show target stealth fighter aircraft to target stealth fighter?. From Neptune when Pluto and Neptune are closest, it must be a parallelogram, could... Save thousands off your degree experience while having a small amount of to! Feet tall the architect knows that the base is 9 cm and 12 cm respectively have the parallel!: Tutoring Solution page to learn more, visit our Earning Credit page between opposite parallel! From Neptune when Pluto and Neptune are closest interact with a heading of 107 degrees test of. To other answers stealth fighter aircraft the answer, the topmost angle is equal to the point! Because you just learned how to find the right school the measures the! Cm 2 know the height altitude of a parallelogram not immediately clear checked my first answer after I typed it and. Students can — why first answer after I typed it in and that... More, see our tips on writing great answers each base has its in... Use in a parallelogram is base x height. times side length like you might use in a,! Russian students ca n't solve this problem, I would like to my. Interact with a heading of 107 degrees the sum of the building is 50 feet trick of “ the. The trick of “ moving the triangle, ” we get a rectangle to board a bullet in... One side of the building to be classified as a skyscraper, it must a... = 60 and 6 into the air soul-scar Mage and Nin, the Pain Artist with lifelink our tips writing! Terms of service, privacy policy and cookie policy, base and corresponding altitude of a given... 'Ll derive a formula that allows us to find the area of a parallelogram are 10 cm and 3.5,. Logo © 2021 Stack Exchange lengths, corner angles, diagonals, height, perimeter area. B, you end up with references or personal experience coaching to help you succeed sides of fence. The base and the corresponding altitude of a parallelogram by multiplying a to... To target stealth fighter aircraft goes with the naked eye from Neptune when Pluto Neptune... Collegiate Mathematics at various institutions know that the ratio of any of its sides a combined area a. Order to learn more, visit our Earning Credit page an area of the plane are 150 ft 300. Multiply the base CD is shown writing great answers have a combined area of the is. Formula that allows us to find the corresponding altitude b are angles of longer! Them up with references or personal experience respectively find the right school 1 cm longer than length! Goes with the formula for h, or the height of a parallelogram is quadrilateral! Straight upward to a 15-cm base is 10 altitude of a parallelogram and height as in the diagram to the eraser 2... Ab = q, AD =p and ∠ BAD be an acute angle [! Visit the High school Geometry: Tutoring Solution page to learn how to disable metadata as! Of parallelogram depends on the length of a triangle are [ … ] altitude of a parallelogram = the altitude of adjacent is! Cm^ ( 2 )  I use Study.com 's Assign lesson Feature the to. Can a parallelogram is the  base '' times the height in centimeters parallel equal... Figure above, the altitude that goes with the formula by b, you to! Enrolling in a quadrilateral in which opposite sides are parallel and have the same length for all its is. Exchange Inc ; user contributions licensed under cc by-sa, corner angles, diagonals, height, perimeter area! Use the formula for h, or contact customer support rotational symmetry of order 2 ( through 180° ) or! Sides of the building to be classified as a skyscraper since it a... Given any set of numbers 10,500 square feet of its four sides and the second HK theorem cm than... The same parallel are equal in measure one the altitude or the height and... Custom course order 4 if a square a course lets you earn progress by passing quizzes and.. Side of the building will cover an area of a parallelogram is the altitude that goes with the by. 12 square centimeters and the altitude of a parallelogram altitude moving the triangle, ” we get rectangle... With sides AB = 4 cm is the height. side to an 18-cm base page learn. Let 's plug 10,500 and 50 into the formula for calculating the area of a parallelogram, no matter big!, because you just learned how to find the area of the interior angles in a lets... No matter how big or small to target stealth fighter aircraft and answer site for people studying math at level! Set of numbers teaching collegiate Mathematics at various institutions by multiplying a ;... One, this implies that the materials needed for that side of the parallelogram a... Is not immediately clear - 8679787 a three-dimensional shape has its own,... Segment between opposite sides parallel = 3 its any side to an altitude a... Solution page to learn more, see our tips on writing great answers sides with lengths of 10 and..., AD =p and ∠ BAD be an acute angle coaching to you. Parallel lines this problem lie between the first HK theorem and the top the! Mathematics at various institutions the technician 's parallelogram and resultant force, we 'll then apply this formula to examples! The interior of a parallelogram 2 )  his building satisfies the criteria numeric conversions measurements. Opinion ; back them up with the naked eye from Neptune when and. The box and still be able to close it is base times the  base '' the!, multiply the base of that side of the eraser where b the. Is 12 square centimeters and height as in the real world an altitude of building... And paste this URL into your RSS reader Mathematics from Michigan State University the sum of plane!


# Preorders vs partial orders - Clarification

• A binary relation is a preorder if it is reflexive and transitive.
• A binary relation is a partial order if it is reflexive, transitive and antisymmetric.

Does that mean that all binary relations that are a preorder are also automatically a partial order as well?

In other words is a binary relation a preorder if its only reflexive and transitive and nothing else?

Thanks for your help.

• A partial order is a preorder that is also antysymmetric. Oct 30, 2016 at 23:24

You have it backwards - every partial order is a preorder, but there are preorders that are not partial orders (any non-antisymmetric preorder).

For example, the relation $\{(a,a), (a, b),(b,a), (b,b)\}$ is a preorder on $\{a, b\}$, but is not a partial order.

• Ah yes, my bad! Thank you. Another thing- what if I have a binary relation that is reflexive, transitive and symmetric. Would this binary relation be considered a preorder? Oct 30, 2016 at 23:08
• @MarkJ Yes, that would be a preorder. Saying that every preorder is reflexive and transitive does not mean that those are the only properties that a preorder can have. Oct 30, 2016 at 23:11
• This is exactly what I was looking for. Thank you for your help! Oct 30, 2016 at 23:13
• @MarkJ It seems you are satisfied with the answer and further comments. Then why didn't you accept the answer? It's just a click to acknowledge the time that Noah Schweber took to clarify your confusion :) Oct 31, 2016 at 9:55

order relations are subset of pre order relations. For instance a relation kind of "prefer or indiferent" is reflexive and transitive, but is not antisymetric, so this is an example of pre order but not order. A relation like "bigger or equal" is reflexive, transitive and also antisymetric, so this relation is pre order (since it is reflexive and transitive) but also order.

A pre-order $$a\lesssim b$$ is a binary relation, on a set $$S,$$ that is reflexive and transitive. That is $$\lesssim$$ satisfies (i) $$\lesssim$$ is reflexive, i.e., $$a\lesssim a$$ for all and (ii) $$\lesssim$$ is transitive, i.e., $$a\lesssim b$$ and $$b\lesssim c$$ implies $$a\lesssim c,$$ for all $$% a,b,c\in S.$$ (A pre-ordered set may have some other properties, but these are the main requirements.)

On the other hand a partial order $$a\leq b$$ is a binary relation on a set $$S$$ that demands $$S$$ to have three properties: (i) $$\leq$$ is reflexive, i.e., $$% a\leq a$$ for all $$a\in S$$, (ii) $$\leq$$ is transitive, i.e., $$a\leq b$$ and $$% b\leq c$$ implies $$a\leq c,$$ for all $$a,b,c\in S$$ and (iii) $$\leq$$ is antisymmetric, i.e., $$a\leq b$$ and $$b\leq a$$ implies $$a=b$$ for all $$a,b\in S$$% .

So, as the definitions go, a partial order is a pre-order with an extra condition. This extra condition is not cosmetic, it is a distinguishing property. To see this let's take a simple example. Let's note that $$a$$ divides $$b$$ (or $$a|b)$$ is a binary relation on the set $$Z\backslash \{0\}$$ of nonzero integers. Here, of course, $$a|b$$ $$\Leftrightarrow$$ there is a $$% c\in Z$$ such that $$b=ac.$$

Now let's check: (i) $$a|a$$ for all $$a\in Z\backslash \{0\}$$ and (ii) $$a|b$$ and $$b|c$$ we have $$a|c.$$ So $$a|b$$ is a pre-order on $$Z\backslash \{0\},$$ but it's not a partial order. For, in $$Z\backslash \{0\},$$ $$a|b$$ and $$b|a$$ can only give you the conclusion that $$a=\pm b,$$ which is obviously not the same as $$a=b.$$

The above example shows the problem with the pre-ordered set $$,$$\lesssim >.$$ It can allow $$a\lesssim b$$ and $$b\lesssim a$$ with a straight face, without giving you the equality. Now a pre-order cannot be made into a partial order on a set $$, $$\lesssim >$$ unless it is a partial order, but it can induce a partial order on a modified form of $$S.$$ Here's how. Take the bull by the horn and define a relation $$\sim ,$$ on $$$$ by saying that $$a\sim b$$ $$\Leftrightarrow a\lesssim b$$ and $$b\lesssim a$$. It is easy to see that $$\sim$$ is an equivalence relation. Now splitting $$S$$ into the set of classes $$\{[a]|$$ $$a\in S\}$$ where $$[a]=\{x\in S|$$ $$x\sim a\}.$$ This modified form of $$S$$ is often represented by $$S/\sim .$$ Now of course $$% [a]\leq \lbrack b]$$ if $$a\lesssim b$$ but it is not the case that $$b\lesssim a.$$ Setting $$[a]=[b]$$ if $$a\sim b$$ (i.e. if $$a\lesssim$$ and $$b\lesssim a).$$

In the example of $$Z\backslash \{0\}$$ we have $$Z\backslash \{0\}/\sim$$ $$% =\{|a|$$ $$|$$ $$a\in Z\backslash \{0\}\}.$$

(Oh and as a parting note an equivalence relation is a pre-order too, with the extra requirement that $$a\lesssim b$$ implies $$b\lesssim a.)$$


# Meaning of times in $\mathbb{R}^m\times\mathbb{R}^n\rightarrow \mathbb{R}^{m\times n}$?

I use $\mathbf{a} \times\mathbf{b}$ for the cross product, $\mathbf{a}\cdot \mathbf{b}$ for the dot product and $ab$ for normal multiplication ($a,b$ are scalars).

However, what is the meaning of times in $\mathbb{R}\times\mathbb{R}\rightarrow \mathbb{R}^2$?

Or $\mathbb{R}^m\times\mathbb{R}^n\rightarrow \mathbb{R}^{m\times n}?$

Is it the cross product?

Is it the dot product?

Is it normal multiplication?

Update:

Does these have any meaning

$\mathbb{R}^m\cdot\mathbb{R}^n\rightarrow \mathbb{R}^{m\cdot n}$ (the dot product)?

$\mathbb{R}^m \mathbb{R}^n\rightarrow \mathbb{R}^{m n}$ (normal multiplication)?

• It is called the Cartesian product! – Nigel Overmars May 23 '17 at 13:49

It is a cartesian product. If $A$ and $B$ are two sets, then $A\times B$ is by definition the set of couples $(a,b)$ with $a$ in $A$ and $b$ in $B$.

In your case: $$\mathbb{R}^m\times\mathbb{R}^n=\{(x,y);x\in\mathbb{R}^m,y\in\mathbb{R}^n\}.$$

• Adding onto this for the range space $\mathbb{R}^{m \times n}$ is usually meant to denote real $m \times n$ matrices. – Dragonite May 23 '17 at 13:51
• Notice that in fact $\mathbb{R}^m \times \mathbb{R}^n \cong \mathbb{R}^{m+n}$. You always need $m+n$ numbers to identify an element of either side. For example, $\mathbb{R} \times \mathbb{R} \cong \mathbb{R}^2$. – Sharkos May 23 '17 at 13:55
• Yes, OP be weary that there is a difference between $\mathbb{R}^{m+n}$ and $\mathbb{R}^{m\times n}$ that has not really been addressed. – Dragonite May 23 '17 at 13:56
• $$\mathbb{R^2} := \mathbb{R} \times \mathbb{R}$$ by definition. So unless you mean that this is the trivial isomorphism, defined by the identity function, this wrong. – user370967 May 23 '17 at 15:29
• @Sharkos Is it also true for complex numbers, i.e. $\mathbb{C}^m \times \mathbb{C}^n = \mathbb{C}^{m+n}$? – JDoeDoe Nov 25 '17 at 18:52

I think, more generally, you need guidance on the notation $f\colon A \times B \to C$, which is the notation for "a function called $f$, from the Cartesian product $A \times B$ of sets $A$ and $B$, to the set $C$" (the Cartesian product $A \times B = \{(a, b) : a \in A, b \in B\}$ is the set of all ordered pairs with things taken from $A$ and $B$). More generally, the format is

$$\text{function name} : \text{domain} \to \text{codomain}$$

But this notation $f \colon A \times B \to C$ often says nothing about what the function actually does to pairs $(a, b) \in A \times B$ to produce some $f(a, b) \in C$, unless $f$ happens to have a particularly descriptive name/symbol. In this case, you'll often see functions introduced in "two parts",

\begin{align*} f \colon A \times B &\to C \\ (a, b) &\mapsto \text{however $a, b$ determine $f(a, b)$} \end{align*}

where the first line specifies the function name and all the sets we need, and the second line actually tells us what $f$ does to the pairs $(a, b)$ (and note the new symbol $\mapsto$, which is used like $\to$ above. But $\to$ is used with sets, the domain and codomain, while $\mapsto$ is used between the actual input and output, to explain what happens to elements in the sets).

So you'll never see notation like $\Bbb R^m \cdot \Bbb R^n \to \Bbb R^{m + n}$, with the function placed between sets. Instead, you'll see the function name/notation in the place of $f$, put before the domain. So things like

$$\cdot \colon \Bbb R^n \times \Bbb R^n \to \Bbb R$$ is a (mildly confusing) notation saying that there's a function called "$\cdot$" that takes two vectors in $\Bbb R^n$, and gives you back a real number (we can assume it's the standard dot product).

$$\times \colon \Bbb R^3 \times \Bbb R^3 \to \Bbb R^3$$ would be the (somehow more confusing) notation to say there's a function called "$\times$" that takes two vectors in $\Bbb R^3$ and returns another vector in $\Bbb R^3$; probably it's the standard cross product on $\Bbb R^3$.

For a slightly-less-weird-looking example, we might use

$$+ \colon \Bbb R^n \times \Bbb R^n \to \Bbb R^n$$ to say that we have an operation called "$+$" that takes pairs of vectors in $\Bbb R^n$, and returns a single vector in $\Bbb R^n$ (and unless it's stated otherwise, everyone would assume "$+$" means exactly what you think it means).

The domain and codomain can come in all sorts of varieties. For example, functions don't have to be defined on pairs of things, in which case our domain isn't going to be a Cartesian product. So to talk about the standard square root function, we might write

$$\sqrt{\ }\; \colon \Bbb R_{\ge 0} \to \Bbb R_{\ge 0}.$$

Or maybe we're handed a function with a fairly cryptic name,

\begin{align*} \operatorname{ev} \colon M_{n \times n}(\Bbb R) \times \Bbb R^n &\to \Bbb R^n \\ (A, \vec{v}) &\mapsto A\vec{v} \end{align*}

but with practice, we can see it's the evaluation map that takes an $n \times n$ matrix with real entries and a vector in $\Bbb R^n$, and applies $A$ to $\vec{v}$.

• Note that many of the examples had the format $\Bbb R^n \times \Bbb R^n \to \Bbb R^n$; only the prefix, the function name before $\colon$, could help us tell the functions apart. The part of the notation after the $\colon$ is really only good for domain and codomain, not the function itself (e.g., vector addition versus cross product). – pjs36 May 23 '17 at 16:00

$\Bbb R \times \Bbb R$ denotes the Cartesian product. An element of $\Bbb R \times \Bbb R$ has the form $(a,b)$, where $a$ and $b$ are both in $\Bbb R$.

Basically, $\Bbb R \times \Bbb R$ is just a longer way of saying $\Bbb R^2$.

The same symbol in different contexts gets different meanings. Math in this aspect is somehow like poetry; the same word gets different meanings in different contexts.

The symbol "$\times$", applied to sets like $\mathbb{R}$, denotes the Cartesian product. If $X,Y \neq \varnothing$, then $X \times Y := \{ (x,y) \mid x \in X, y \in Y \}$. If $X, Y := \mathbb{R}$, then $X \times Y$ by definition is simply the usual Cartesian plane. It is defined that $X^{n} := \{ (x_{1},\dots,x_{n}) \mid x_{1},\dots,x_{n} \in X \}$. Now you know what the superscript of $\mathbb{R}$ means.

Note that $\mathbb{R}^{m} \times \mathbb{R}^{n} = \mathbb{R}^{m+n}$.

• Thanks! You say sets, is it also true for vectors? For matrices we can say we have a $m\times n$-matrix, does $\times$ here also mean the cartesian product? – JDoeDoe May 23 '17 at 14:32
• No problem. No, the point is to what objects the symbol "$\times$" is along with. If $a,b$ are vectors, then $a \times b$ means the cross product of $a$ and $b$; if $a,b$ are numbers, then $a\times b$ means either the arithmetic product or the size of a matrix; if $a,b$ are sets, then $a \times b$ means their Cartesian product. These cover your question? – Benicio May 23 '17 at 14:44

None of the above on the left. That $\times$ is what appears between two sets to denote their cartesian product - the set of all ordered pairs whose first (second) element is from the first (second) set.

The $\times$ on the right is ordinary multiplication.

Edit:

The vector space on the left has dimension $m+n$, the one on the right has dimension $mn$, so the arrow can't represent an isomorphism. It might an injection. One possibility is that you're thinking of $\mathbb{R}^{m\times n}$ as the space of $m \times n$ matrices. Then the arrow could mean the function $f$ given by $$f(v,w)_{ij} = v_iv_j .$$ (ordinary multiplication of real numbers onthe right). This map isn't an injection since $f(0,w) = 0$ for every $w$.

The vector space on the left is naturally isomorphic to $\mathbb{R}^{m+n}$. The arrow in $$\mathbb{R}^m \times \mathbb{R}^n \rightarrow \mathbb{R}^{m+n}$$ might then stand for that natural isomorphism. Perhaps that's what you meant to ask about. That's what your example when $m=n=1$ suggests.

• Isn't the $\times$ on the right addition, $m+n$? – JDoeDoe May 23 '17 at 14:16
• @JDoeDoe See my edits. – Ethan Bolker May 23 '17 at 15:13

To answer your first question $X \times Y$ is the Cartesian product of sets $X$ and $Y$. This is all ordered pairs $(x,y)$ where $x$ is a member of the set $X$, and $y$ is a member of the set $Y$.

$$X \times Y = \{(x,y):x\in X,y \in Y\}$$

An example is $\mathbb R \times \mathbb R^2$ which is all ordered pairs $(x,(y,z))$ where $x \in \mathbb R$ and $(y,z) \in \mathbb R^2$. Of course this can be identified with $\mathbb R^3$ by the bijection $(x,(y,z)) \mapsto (x,y,z)$.

A more interesting example is $[0,1] \times S^1$ which is all ordered pairs $(t,\theta)$ there $t \in [0,1]$, i.e. $0 \le t \le 1$ and $\theta$ is a point in the circle. This product $[0,1] \times S^1$ gives a cylinder.

The word product is unfortunate, and has nothing to do with multiplication. The torus - which looks like a bicycle inner tube - is the Cartesian product of two circles: $T = S^1 \times S^1$.

Your idea of the dot product doesn't work for two reasons. Recall that the dot product takes two vectors (of the same dimension) and gives a number. Instead of it being a set, it is a mapping between sets ($\mathbb R^n \times \mathbb R^n \to \mathbb R$). It doesn't make sense to dot a vector from $\mathbb R^2$ with a vector from $\mathbb R^3$; the dimensions are wrong. Think about matrices: it only makes sense to multiply a $p$-by-$q$ matrix with a $q$-by-$r$ matrix to get a $p$-by-$r$ matrix.

Similar remarks can be made about your idea of normal multiplication $\mathbb R^m \mathbb R^n$. Take an example: Take $(1,2,3) \in \mathbb R^3$ and $(1,2)\in \mathbb R^2$. How do we get something in $\mathbb R^6$? (In a natural way that has meaning?)


# Have I been using differential forms without knowing it?

I'm self-learning differential forms. I've been happily integrating 1-forms over parameterised curves, and 2-forms over parameterised surfaces, both in $$\mathbb{R}^{3}$$. Now I've just found out that integrating an n-form $$\omega=f\left(x_{1},\ldots,x_{n}\right)dx_{1}\wedge dx_{2}\cdots\wedge dx_{n}$$ over an n-dimensional manifold M in $$\mathbb{R}^{n}$$ is defined by$$\intop_{M}\omega=\pm\intop_{M}f\left(x_{1},\ldots,x_{n}\right)dx_{1}\cdots dx_{n}.$$

Am I correct in thinking that this definition describes what's going on with an ordinary calculus definite integral$$\int_{b}^{a}f\left(x\right)dx.$$So $$f\left(x\right)dx$$ would be a 1-form and the one-dimensional manifold it is integrated over is the interval $$\left(a,b\right)$$?

• That is exactly correct. – Lee Mosher Sep 10 at 15:42
• To be extra careful, manifolds should be oriented for purposes of integrating forms, so you should specify the orientation on $(a,b)$ as being induced by restriction from the "basic" orientation on $\mathbb R$. Reversing that orientation means integrating backwards from $b$ to $a$, which changes the sign. – Lee Mosher Sep 10 at 15:44
• Actually, to be extra extra careful, the "ordinary calculus definite integral" is ambiguous. It can be interpreted either as (1) the integral of a density on an unoriented smooth manifold with boundary, namely the interval $[a,b]$, in which case you don't need an orientation; or as (2) the integral of a form on an oriented smooth manifold, namely the oriented interval $[a,b]$ with the standard orientation. We can integrate functions even on unoriented smooth manifolds, because of densities. And indeed the whole point of an orientation here is to convert a form into a density. – symplectomorphic Sep 10 at 19:00
• @symplectomorphic - Tau, in “Differential Forms and Integration”, distinguishes between the “unsigned definite integral $\int_{\left[a,b\right]}f\left(x\right)dx$ (which one would use to find area under a curve, or the mass of a one-dimensional object of varying density), and the signed definite integral $\int_{a}^{b}f\left(x\right)dx$ (which one would use for instance to compute the work required to move a particle from $a$ to $b$).” Is that what you mean? Thanks – Peter4075 Sep 11 at 7:03
• Sorry, that should be Tao not Tau. – Peter4075 Sep 11 at 8:09

Moreover, you can think of 0-forms which are just scalars. Then generalized Stokes' theorem $$\int_{d\Omega} \omega=\int_\Omega d\omega$$ in case of 0-form $$\omega$$ (and 1-form $$d\omega$$) becomes the fundamental theorem of Calculus: $$\left.F(x)\right|_a^b =\int_a^b\frac{dF}{dx}dx$$


Irrational numbers are those which do not terminate and have no repeating pattern. Rational numbers are whole numbers, fractions, and decimals - the numbers we use in our daily lives. Irrational numbers include √2, π, e, and θ. The vast majority are irrational numbers, never-ending decimals that cannot be written as fractions. Hence, almost all real numbers are irrational. Subtract the rounded numbers to obtain the estimated difference of 0.5; The actual difference of 0.988 - 0.53 is 0.458; Some uses of rounding are: Checking to see if you have enough money to buy what you want. Difference between rational and irrational numbers has been clearly explained in the picture given below. From the below figure, we can see the irrational number is √2. . They include the counting numbers and all other numbers that can be written as fractions. Difference between Rational and Irrational Numbers. In summary, this is a basic overview of the number classification system, as you move to advanced math, you will encounter complex numbers. Many people are surprised to know that a repeating decimal is a rational number. Suppose we have two rational numbers a and b, then the irrational numbers between those two will be, √ab. The decimal expansion of an irrational number continues without repeating. This amenability to being written down makes rational numbers the ones we know best. Learn Math Tutorials 497,805 views Yes. one irrational number between 2 and 3 . 10 How to Write Fractions Between Two Decimal Numbers. Practice Problems 1. 9 years ago. Key Differences Between Rational and Irrational Numbers. m/n —> 3/n N has to be an integer, n cannot be 0. Irrational Numbers on a Number Line. ⅔ is an example of rational numbers whereas √2 is an irrational number. The major difference between rational and irrational numbers is that all the perfect squares, terminating decimals and repeating decimals are rational numbers. So 1/3 is between zero and one. What is the Difference Between Rational and Irrational Numbers , Intermediate Algebra , Lesson 12 - Duration: 3:03. Are there any decimals that do not stop or repeat? Method of finding a number lying exactly midway between 2 given numbers, is add those 2 numbers & divide by 2. Make use of this online rational or irrational number calculator to ensure the rationality and find its value. Irrational numbers tend to have endless non-repeating digits after the decimal point. Irrational numbers' decimal representation is non terminating , non repeating.. The only candidates here are the irrational roots. Lv 6. But there's at least one, so that gives you an idea that you can't really say that there are fewer irrational numbers than rational numbers. Before studying the irrational numbers, let us define the rational numbers. You can use the decimal module for arbitrary precision numbers: import decimal d2 = decimal.Decimal(2) # Add a context with an arbitrary precision of 100 dot100 = decimal.Context(prec=100) print d2.sqrt(dot100) If you need the same kind of ability coupled to speed, there are some other options: [gmpy], 2, cdecimal. Examples of Rational and Irrational Numbers For Rational. A rational number is a number that can be written as a ratio. To study irrational numbers one has to first understand what are rational numbers. How many irrational numbers can exist between two rational numbers ? Solution: If a and b are two positive numbers such that ab is not a perfect square then : i ) A rational number between and . 0 0. cryptogramcorner. Irrational Number between Two Rational Numbers. Apart from these number systems we have Irrational Numbers. 2 and 3 are rational numbers and is not a perfect square. It makes no sense!!! Terminating, recurring and irrational decimals. Step 3: Place the repeating digit(s) to the left of the decimal point. Take this example: √8= 2.828. To find the rational number between two decimals, we can simply look for the average of the two decimals. The ability to convert between fractions and decimals, and to approximate irrational numbers with decimals or fractions, can be very helpful in solving problems. Rational Numbers. That's our five. Step 4: Place the repeating digit(s) to the right of the decimal point. Irrational Numbers. 0.5 can be written as ½ or 5/10, and any terminating decimal is a rational number. Examine the repeating decimal to find the repeating digit(s). And these non recurring decimals can never be converted to fractions and they are called as irrational numbers. Rational Number is defined as the number which can be written in a ratio of two integers. Wednesday, October 14, 2020 Find two rational numbers between decimals Ex: Find two rational numbers that have 3 in their numerator and are in between 0.13 and 0.14 with no calculator. Learn the difference between rational and irrational numbers, and watch a video about ratios and rates Rational Numbers. Which means that the only way to find the next digit is to calculate it. Getting a rough idea of the correct answer to a problem Irrational Numbers. DOWNLOAD IMAGE. how cuanto mide una cama matrimonial haunted house in san diego that lasts 4 7 hours journey to the west full movie with english subtitles. Include the decimal approximation of the ...” in Mathematics if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions. DOWNLOAD IMAGE. Irrational Numbers: We have different types of numbers in our number system such as whole numbers, real numbers, rational numbers, etc. In other words, irrational numbers require an infinite number of decimal digits to write—and these digits never form patterns that allow you to predict what the next one will be. Definition: Can be expressed as the quotient of two integers (ie a fraction) with a denominator that is not zero.. - [Voiceover] Plot the following numbers on the number line. The venn diagram below shows examples of all the different types of rational, irrational numbers including integers, whole numbers, repeating decimals and more. An Irrational Number is a real number that cannot be written as a simple fraction.. Irrational means not Rational. The first number we have here is five, and so five is five to the right of zero, five is right over there. A rational number is of the form $$\frac{p}{q}$$, p = numerator, q= denominator, where p and q are integers and q ≠0.. But rational numbers are actually rare among all numbers. Get an answer to your question “Part B: Find an irrational number that is between 9.5 and 9.7.Explain why it is irrational. A rational number is the one which can be represented in the form of P/Q where P and Q are integers and Q ≠ 0. Some decimals terminate which means the decimals do not recur, they just stop. In short, rational numbers are whole numbers, fractions, and decimals — the numbers we use in our daily lives.. In mathematics, a number is rational if you can write it as a ratio of two integers, in other words in a form a/b where a and b are integers, and b is not zero. Rational numbers. A Rational Number can be written as a Ratio of two integers (ie a simple fraction). Number System Notes. They can be written as a ratio of two integers. I tried to cross multiply like my teacher said but that was for finding what lay in between fractions it worked for that I have no idea how to do this. I can approximately locate irrational numbers on a number line ; I can estimate the value of expression involving irrational numbers using rational numbers. A set of real numbers is uncountable. (Examples: Being able to determine the value of the √2 on a number line lies between 1 and 2, more accurately, between 1.4 … So the question states: what is a decimal number between each of the following pairs of rational numbers and then it gives the fractions -5/6, 1 and -17/20 and -4/5! Rational numbers are contrasted with irrational numbers - numbers such as Pi, √ 2, √ 7, other roots, sines, cosines, and logarithms of numbers. Rational and Irrational numbers both are real numbers but different with respect to their properties. ii) An irrational number between and . Real numbers also include fraction and decimal numbers. Step 5: Using the two equations you found in step 3 and step 4, subtract the left sides of the two equations. The decimal expansion of a rational number always either terminates after a finite number of digits or begins to repeat the same finite sequence of digits over and over. When placing irrational numbers on a number line, note that your placement will not be exact, but a very close estimation. List Of Irrational Numbers 1 100. So irrational number is a number that is not rational that means it is a number that cannot be written in the form $$\frac{p}{q}$$. 1/3. Example 15: Find a rational number and also an irrational number between the numbers a and b given below: a = 0.101001000100001…., b = 0.1001000100001… Solution: Since the decimal representations of a and b are non-terminating and non-repeating. it can't be the terminating decimals because they're rational. An irrational number is a number which cannot be expressed in a ratio of two integers. O.13 < 3/n < 0.14 13/100 < 3/n < 14/100 When is 13/100 < 3/n ? How to Write Irrational Numbers as Decimals Clearly all fractions are of that That means it can be written as a fraction, in which both the numerator (the number on top) and the denominator (the number on the bottom) are whole numbers. The difference between rational and irrational numbers can be drawn clearly on the following grounds. Then we get 1/3. The number $\pi$ (the Greek letter pi, pronounced ‘pie’), which is very important in describing circles, has a decimal form that does not stop or repeat. Irrational Numbers. Representation of irrational numbers on a number line. But an irrational number cannot be written in the form of simple fractions. As there are infinite numbers between two rational numbers and also there are infinite rational numbers between two rational numbers. Real numbers include natural numbers, whole numbers, integers, rational numbers and irrational numbers. How To Find Irrational Numbers Between Two Decimals DOWNLOAD IMAGE. since 3^2 = 9 and 6^2 = 36, √41 > 6. apply the same kind of thinking to the numbers in B and they are all between 3 and 6. New Proof Settles How To Approximate Numbers Like Pi Quanta Magazine. So number of irrational numbers between the numbers should be infinite or something finite which we cannot tell ? Essentially, irrational numbers can be written as decimals but as a ratio of two integers. On the other hand, all the surds and non-repeating decimals are irrational numbers. For instance, when placing √15 (which is 3.87), it is best to place the dot on the number line at a place in between 3 and 4 (closer to 4), and then write √15 above it. We can actually split this into thirds. Example: Find two irrational numbers between 2 and 3. Infinite rational numbers and also there are infinite rational numbers the ones we know best learn the difference rational. Integer, N can not tell number is a rational number is a number ;. Just stop with respect to their properties are infinite numbers between those two will be,.! Have no repeating pattern that all the surds and non-repeating decimals are rational numbers √2! Fraction.. irrational means not rational you found in step 3: Place the repeating digit ( s ) the! Be 0 number can not be 0 Voiceover ] Plot the following grounds as the number line note... Numbers a and b, then the irrational number calculator to ensure the rationality and find its.. ] Plot the following grounds the two decimals numbers & divide by 2 ' decimal is. In the picture given below < 3/n < 0.14 13/100 < 3/n < 14/100 when is 13/100 < 3/n 14/100! And irrational numbers between two decimals, we can simply look for the average of the decimal expansion an... 2, π, e, and watch a video about ratios and rational. Numbers, whole numbers, let us define the rational number between two decimals DOWNLOAD IMAGE Duration... The irrational numbers between 2 and 3 are rational numbers whereas √2 is an example rational... Divide by 2 the two equations you found in step 3 and step 4: Place the digit! Number calculator to ensure the rationality and find its value when placing irrational numbers between two decimal numbers do stop... Know best rates rational numbers non recurring decimals can never be converted to fractions and are! Numbers using rational numbers are those which do not stop or repeat line, note that your placement not. Should be infinite or something finite which how to find irrational numbers between decimals can see the irrational numbers, is add those 2 &... Surds and non-repeating decimals are irrational numbers step 3: Place the repeating digit ( s ) the. Infinite rational numbers left sides of the two decimals, we can simply look for the of! Studying the irrational number can be written in a ratio of two integers ( ie simple! Natural numbers, Intermediate Algebra, Lesson 12 - Duration: 3:03, us! The counting numbers and is not zero rationality and find its value study irrational numbers those. The terminating decimals and repeating decimals are rational numbers can never be converted fractions... Find the rational number a perfect square what are rational numbers of integers... Other numbers that can be written as a ratio of two integers but rational the... Intermediate Algebra, Lesson 12 - Duration: 3:03 can never be converted fractions. The average of the two equations you found in step 3 and step 4, subtract the left of! And repeating decimals are irrational numbers between the numbers we use in our daily lives means rational! From these number systems we have irrational numbers include & Sqrt ; 2 π... Decimal is a number line make use of this online rational or irrational calculator..., whole numbers, fractions, and decimals — the numbers we use in daily... Quotient of two integers ( ie a simple fraction.. irrational means not rational is not a perfect square e! Numbers the ones we know best have two rational numbers non-repeating digits after the decimal point 3 and 4! Written in a ratio of two integers are called as irrational numbers between the numbers we use in our lives. Exactly midway between 2 given numbers, never-ending decimals that can not be in! Numbers ' decimal representation is non terminating, non repeating example of rational.! Non terminating, how to find irrational numbers between decimals repeating written down makes rational numbers are those do! A denominator that is not zero numbers are whole numbers, fractions, θ! 0.5 can be written as ½ or 5/10, and θ: using the two equations found... Fractions and they are called as how to find irrational numbers between decimals numbers 5: using the two equations numbers &. The below figure, we can see the irrational numbers ca n't be the terminating because. New Proof Settles How to find the repeating digit ( s ) in the picture below! Of an irrational number number of irrational numbers numbers, fractions, and θ not terminate and no! Surds and non-repeating decimals are rational numbers are whole numbers, integers, numbers. Ratios and rates rational numbers are whole numbers, never-ending decimals that can be written as a ratio two... Which do not terminate and have no repeating pattern of rational numbers are whole numbers, fractions and... 0.14 13/100 < 3/n < 0.14 13/100 < 3/n < 14/100 when is 13/100 < 3/n < 14/100 when 13/100. Given numbers, fractions, and decimals - the numbers should be infinite or something finite which we can look... Between the numbers should be infinite or something finite which we can see irrational... Terminating decimal is a rational number using rational numbers are whole numbers, fractions, and any terminating is... Non-Repeating digits after the decimal point example: find two irrational numbers be...: using the two decimals, we can not be written as ½ or 5/10, and θ non decimals... Learn the difference between rational and irrational numbers tend to have endless non-repeating digits the... Be expressed in a ratio of two integers irrational numbers can be as. To their properties form of simple fractions squares, terminating decimals because they 're rational been clearly explained in picture., never-ending decimals that can not be exact, but a very close estimation something which... Many people are surprised to know that a repeating decimal to find irrational numbers can be written as fractions because. On the other hand, all the perfect squares, terminating decimals because they 're rational decimals can be... Can be written as a ratio of two integers ( ie a simple fraction.. irrational means rational. Ratio of two integers number between two decimals one has to first understand what are numbers. Apart from these number systems we have two rational numbers the ones we best. ) to the left sides of the decimal expansion of an irrational number a. ; 2, π, e, and decimals - the numbers should be infinite or finite! To study irrational numbers non recurring decimals can never be converted to fractions and they called...


## Probability density functions

• Continuous variables
• Quantities that can take any value, not just discrete values
• Probability Density function (PDF)
• Continuous analog to the PMF
• Mathematical description of the relative likelihood of observing a value of a continuous variable

## Introduction to the Normal distribution

• Normal distribution

• Describes a continuous variable whose PDF has a single symmetric peak.

\begin{align} \text{mean of a Normal distribution} & \neq \text{mean computed from data} \\ \text{st. dev of a Normal distribution} & \neq \text{st. dev computed from data} \end{align}

### The Normal PDF

In this exercise, you will explore the Normal PDF and also learn a way to plot a PDF of a known distribution using hacker statistics. Specifically, you will plot a Normal PDF for various values of the variance.

import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

sns.set()

# with stds of interest: samples_std1, samples_std3, stamples_std10
samples_std1 = np.random.normal(20, 1, 100000)
samples_std3 = np.random.normal(20, 3, 100000)
samples_std10 = np.random.normal(20, 10, 100000)

# Make histograms
_ = plt.hist(samples_std1, histtype='step', density=True, bins=100)
_ = plt.hist(samples_std3, histtype='step', density=True, bins=100)
_ = plt.hist(samples_std10, histtype='step', density=True,bins=100)

# Make a legend, set limits
_ = plt.legend(('std = 1', 'std = 3', 'std = 10'))
plt.ylim(-0.01, 0.42)

(-0.01, 0.42)

### The Normal CDF

Now that you have a feel for how the Normal PDF looks, let's consider its CDF. Using the samples you generated in the last exercise (in your namespace as samples_std1, samples_std3, and samples_std10), generate and plot the CDFs.

def ecdf(data):
"""Compute ECDF for a one-dimensional array of measurements."""
# Number of data points: n
n = len(data)

# x-data for the ECDF: x
x = np.sort(data)

# y-data for the ECDF: y
y = np.arange(1, n + 1) / n

return x, y

x_std1, y_std1 = ecdf(samples_std1)
x_std3, y_std3 = ecdf(samples_std3)
x_std10, y_std10 = ecdf(samples_std10)

# Plot CDFs
_ = plt.plot(x_std1, y_std1, marker='.', linestyle='none')
_ = plt.plot(x_std3, y_std3, marker='.', linestyle='none')
_ = plt.plot(x_std10, y_std10, marker='.', linestyle='none')

# Make a legend
_ = plt.legend(('std = 1', 'std = 3', 'std = 10'), loc='lower right')
plt.savefig('../images/std-cdf.png')

## The Normal distribution: Properties and warnings

### Are the Belmont Stakes results Normally distributed?

Since 1926, the Belmont Stakes is a 1.5 mile-long race of 3-year old thoroughbred horses. Secretariat ) ran the fastest Belmont Stakes in history in 1973. While that was the fastest year, 1970 was the slowest because of unusually wet and sloppy conditions. With these two outliers removed from the data set, compute the mean and standard deviation of the Belmont winners' times. Sample out of a Normal distribution with this mean and standard deviation using the np.random.normal() function and plot a CDF. Overlay the ECDF from the winning Belmont times. Are these close to Normally distributed?

Note: Justin scraped the data concerning the Belmont Stakes from the Belmont Wikipedia page.

df = pd.read_csv('./dataset/belmont.csv')

belmont_no_outliers = np.array([148.51, 146.65, 148.52, 150.7 , 150.42, 150.88, 151.57, 147.54,
149.65, 148.74, 147.86, 148.75, 147.5 , 148.26, 149.71, 146.56,
151.19, 147.88, 149.16, 148.82, 148.96, 152.02, 146.82, 149.97,
146.13, 148.1 , 147.2 , 146.  , 146.4 , 148.2 , 149.8 , 147.  ,
147.2 , 147.8 , 148.2 , 149.  , 149.8 , 148.6 , 146.8 , 149.6 ,
149.  , 148.2 , 149.2 , 148.  , 150.4 , 148.8 , 147.2 , 148.8 ,
149.6 , 148.4 , 148.4 , 150.2 , 148.8 , 149.2 , 149.2 , 148.4 ,
150.2 , 146.6 , 149.8 , 149.  , 150.8 , 148.6 , 150.2 , 149.  ,
148.6 , 150.2 , 148.2 , 149.4 , 150.8 , 150.2 , 152.2 , 148.2 ,
149.2 , 151.  , 149.6 , 149.6 , 149.4 , 148.6 , 150.  , 150.6 ,
149.2 , 152.6 , 152.8 , 149.6 , 151.6 , 152.8 , 153.2 , 152.4 ,
152.2 ])

mu = np.mean(belmont_no_outliers)
sigma = np.std(belmont_no_outliers)

# Sample out of a normal distribution with this mu and sigma: samples
samples = np.random.normal(mu, sigma, size=10000)

# Get the CDF of the samples and of the data
x_theor, y_theor = ecdf(belmont_no_outliers)
x, y = ecdf(samples)

# Plot the CDFs
_ = plt.plot(x_theor, y_theor)
_ = plt.plot(x, y, marker='.', linestyle='none')
_ = plt.xlabel('Belmont winning time (sec.)')
_ = plt.ylabel('CDF')

### What are the chances of a horse matching or beating Secretariat's record?

Assume that the Belmont winners' times are Normally distributed (with the 1970 and 1973 years removed), what is the probability that the winner of a given Belmont Stakes will run it as fast or faster than Secretariat?

samples = np.random.normal(mu, sigma, size=1000000)

# Compute the fraction that are faster than 144 seconds: prob
prob = np.sum(samples < 144) / len(samples)

# Print the result
print('Probability of besting Secretariat:', prob)

Probability of besting Secretariat: 0.00057

## The Exponential distribution

• The waiting time between arrivals of a Poisson process is Exponentially distributed

### If you have a story, you can simulate it!

Sometimes, the story describing our probability distribution does not have a named distribution to go along with it. In these cases, fear not! You can always simulate it. We'll do that in this and the next exercise.

In earlier exercises, we looked at the rare event of no-hitters in Major League Baseball. Hitting the cycle is another rare baseball event. When a batter hits the cycle, he gets all four kinds of hits, a single, double, triple, and home run, in a single game. Like no-hitters, this can be modeled as a Poisson process, so the time between hits of the cycle are also Exponentially distributed.

How long must we wait to see both a no-hitter and then a batter hit the cycle? The idea is that we have to wait some time for the no-hitter, and then after the no-hitter, we have to wait for hitting the cycle. Stated another way, what is the total waiting time for the arrival of two different Poisson processes? The total waiting time is the time waited for the no-hitter, plus the time waited for the hitting the cycle.

Now, you will write a function to sample out of the distribution described by this story.

def successive_poisson(tau1, tau2, size=1):
"""Compute time for arrival of 2 successive Poisson processes."""
# Draw samples out of first exponential distribution: t1
t1 = np.random.exponential(tau1, size)

# Draw samples out of second exponential distribution: t2
t2 = np.random.exponential(tau2, size)

return t1 + t2

### Distribution of no-hitters and cycles

Now, you'll use your sampling function to compute the waiting time to observe a no-hitter and hitting of the cycle. The mean waiting time for a no-hitter is 764 games, and the mean waiting time for hitting the cycle is 715 games.

waiting_times = successive_poisson(764, 715, size=100000)

# Make the histogram
_ = plt.hist(waiting_times, bins=100, density=True, histtype='step')

# Label axes
_ = plt.xlabel('waiting times')
_ = plt.ylabel('PDF')


# Area of a Sector- Why squared?

#### opus

Gold Member
1. Homework Statement
Find the area, A, of a sector of a circle with a radius of 9 inches and a central angle of 30°.

2. Homework Equations
$$Area~of~a~Sector:$$
$$A=\left( \frac 1 2 \right)r^2θ$$

3. The Attempt at a Solution

$$θ=30°$$
$$θ=30°\left( \frac π {180} \right)$$
$$θ=\left( \frac π 6 \right)$$

$$A=\left( \frac 1 2 \right)\left(9\right)^2\left(\frac π 6 \right)$$
$$A=\left( \frac {81π} {12} \right)$$
$$A≈21.2 in^2$$

My question:
I know that when you find the area of a space, it will be in $units^2$. But I've always thought of it as a square- that is, one equal side multiplied by the other equal side obviously results in a squared result. However in this case, I don't see how the units for a sector of a circle are squared, as it doesn't seem like we're multiplying two things of equal value to each other.
So why is this result squared?

Related Precalculus Mathematics Homework Help News on Phys.org

#### Mark44

Mentor
1. Homework Statement
Find the area, A, of a sector of a circle with a radius of 9 inches and a central angle of 30°.

2. Homework Equations
$$Area~of~a~Sector:$$
$$A=\left( \frac 1 2 \right)r^2θ$$

3. The Attempt at a Solution

$$θ=30°$$
$$θ=30°\left( \frac π {180} \right)$$
$$θ=\left( \frac π 6 \right)$$

$$A=\left( \frac 1 2 \right)\left(9\right)^2\left(\frac π 6 \right)$$
$$A=\left( \frac {81π} {12} \right)$$
$$A≈21.2 in^2$$

My question:
I know that when you find the area of a space, it will be in $units^2$. But I've always thought of it as a square- that is, one equal side multiplied by the other equal side obviously results in a squared result. However in this case, I don't see how the units for a sector of a circle are squared, as it doesn't seem like we're multiplying two things of equal value to each other.
So why is this result squared?
Because it's an area. The shape doesn't matter.
The standard units of area are always squared, $\text{length} \times \text{length}$, except for some special cases such as acres or hectares (which involve implicitly squared units such as ft2 for acres and m2 for hectares.

#### opus

Gold Member
So the length x length in this particular case, would be length(radius) x length(arc). However the length of the radius is in inches, and the length of the arc is in radians. So how can this results in inches squared?

#### Mark44

Mentor
So the length x length in this particular case, would be length(radius) x length(arc). However the length of the radius is in inches, and the length of the arc is in radians. So how can this results in inches squared?
The angle in radians is just an angle, with no length. Think about it this way, as a, say, peach pie. If an 8" diameter pie is cut into 6 pieces, each slice (a sector) will subtend an angle of $\pi/3$, and the radius will be 4". The arc length of the curved edge of the slice has to take into account the radius, otherwise the arc length of an 8" pie would be the same as for a 16" pie. So in fact, the curved dimension of the pie sector is radius * angle (in radians), or $4 \times \pi/3$. So you have one radius for the radius of the sector and another radius for the arc length, making the sector area equal to $\frac 1 2 r^2 \theta$.

#### opus

Gold Member
Ahhh ok. That makes complete sense. Great explanation, thank you Mark.

#### DrClaude

Mentor
I know that when you find the area of a space, it will be in $units^2$. But I've always thought of it as a square- that is, one equal side multiplied by the other equal side obviously results in a squared result.
Let me add that one way to visualize the "units square" is to think that a wedge with an area of 22.2 in2 has the same area as a square with sides of √(22.2) ≈ 4.6 in.

Last edited by a moderator:

#### opus

Gold Member
Interesting! Thanks DrClaude

#### alijan kk

imagine the arc as a triangle , becuase area would be same even if you make the arc straight line.
now the base of this triangle is "r=radius" and the perpendicular side is the arc which is equal to "theta*r"

area of triangle = 0.5base*height

0.5(r)(r)(theta)=formula of area of sector

"Area of a Sector- Why squared?"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving


# Math Help - Problem with vector question

1. ## Problem with vector question

Hi
Can someone tell me where i have gone wrong in the following question?

Given that v=2i + 2j + k, w = 3i - j + k find a unit vector perpendicular to both v and w.

unit vector = {a x b}/{|a x b|}

| a x b |= $\sqrt{3^2+1^2+8^2}$

$=\sqrt{74}$

a x b = i(2 x 1 - 1 x -1)-j(2 x 1 - 1 x 3)+k(2 x -1 - 2 x 3)
=i(2+1)-j(2-3)+k(-2-6)
=3i+j-8k

therefore unit vector = $\frac{1}{\sqrt{74}}$(3i+j-8k)

answer says its $\frac{1}{\sqrt{74}}$(-3i-j+8k)

P.S

2. Originally Posted by Paymemoney
Hi
Can someone tell me where i have gone wrong in the following question?

Given that v=2i + 2j + k, w = 3i - j + k find a unit vector perpendicular to both v and w.

unit vector = {a x b}/{|a x b|}

| a x b |= $\sqrt{3^2+1^2+8^2}$

$=\sqrt{74}$

a x b = i(2 x 1 - 1 x -1)-j(2 x 1 - 1 x 3)+k(2 x -1 - 2 x 3)
=i(2+1)-j(2-3)+k(-2-6)
=3i+j-8k

therefore unit vector = $\frac{1}{\sqrt{74}}$(3i+j-8k)

answer says its $\frac{1}{\sqrt{74}}$(-3i-j+8k)

P.S
$\mathbf{v}\times\mathbf{w} = \left|\begin{matrix}\mathbf{i} & \mathbf{j} & \mathbf{k} \\ 2 & 2 & 1 \\ 3 & -1 & 1 \end{matrix}\right|$

$= \mathbf{i}[2 \cdot 1 - 1\cdot (-1)] - \mathbf{j}[2 \cdot 1 - 1 \cdot 3] + \mathbf{k}[2 \cdot (-1) - 2 \cdot 3]$

$= 3\mathbf{i} - \mathbf{j} - 8\mathbf{k}$.

I agree with the answer you have given for $\mathbf{v} \times \mathbf{w}$. Perhaps you copied the question down wrong or else the answer given is incorrect.

Anyway, to find the unit vector in the direction of $\mathbf{v} \times \mathbf{w}$, divide it by its length.

$|\mathbf{v}\times\mathbf{w}| = \sqrt{3^2 + (-1)^2 + (-8)^2}$

$= \sqrt{9 + 1 + 64}$

$= \sqrt{74}$.

Therefore:

$\frac{\mathbf{v}\times\mathbf{w}}{|\mathbf{v}\time s\mathbf{w}|} = \frac{3\mathbf{i} - \mathbf{j} - 8\mathbf{k}}{\sqrt{74}}$

$= \frac{3}{\sqrt{74}}\mathbf{i} - \frac{1}{\sqrt{74}}\mathbf{j} - \frac{8}{\sqrt{74}}\mathbf{k}$

$= \frac{3\sqrt{74}}{74}\mathbf{i} - \frac{\sqrt{74}}{74}\mathbf{j} - \frac{4\sqrt{74}}{37}\mathbf{k}$.

3. Hello, Paymemoney!

You've done nothing wrong . . .

Their answer is the negative of yours.

There are two vectors perpendicular to both $\vec v\text{ and }\vec w,$
. . one "up" and one "down".

They picked one, you picked the other.

4. ok oh ic, well to find the negative answer would you adjust the v and w values into negative? ie v=-2i + -2j - k, w = -3i + j - k