Wikipedia:Reference desk/Archives/Mathematics/2010 September 1
Mathematics desk | ||
---|---|---|
< August 31 | << Aug | September | Oct >> | September 2 > |
Welcome to the Wikipedia Mathematics Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
September 1
[edit]Rotation matrix: counterclockwise vs. clockwise
[edit]Hello, I am trying to teach myself algebraic matrices. I seem to understand them, and am getting right answers, except in one particular case. For the life of me, I can't understand why the matrix for a 90-degree counterclockwise rotation is what it is.
We are told (for example at Rotation matrix) that the 90-degree counterclockwise rotation matrix is
but to me that looks like a clockwise rotation. Consider the illustration at Matrix_(mathematics)#Interpretation_as_a_parallelogram, which represents the transform of the unit square by the matrix
If we plug in the numbers from the above counterclockwise rotation matrix, then the (a,b) vertex — originating at (1,0) as a corner of the unit square — is transformed to (0, –1). No? Meanwhile the (c,d) vertex, originating at (0,1), is transformed to (1,0). To me that produces a clockwise rotation: The unit square has been rotated such that it is now below the x-axis but still to the right of the y-axis. What gives?
I get the same result when I multiply the row vectors of the unit square [0 0], [1 0], [1 1], [0 1] (also from Matrix_(mathematics)#Interpretation_as_a_parallelogram) by the 90-degree counterclockwise rotation matrix above. This seems to produce the vertices [0 0], [0 –1], [1 –1], [1 0] — which again describes a clockwise rotation below the x-axis.
What am I misunderstanding about this interpretation of the rotation matrix? It is particularly vexing since I've had success with every basic type of transform, except for rotations greater or less than 180 degrees. Help is greatly appreciated. -Jordgette (talk) 00:16, 1 September 2010 (UTC)
- My guess is that the mistake is in your matrix multiplication. Using your matrix A, . Perhaps you were calculating ? The convention is to use column vectors and (therefore) multiply with the matrix on the left and the vector on the right. Given A and v, , so reversing the multiplication (and transposing v to make the multiplication work then) is equivalent to transposing A, which in your case makes it equal to -A, so of course it generates the negative of the vector that you want (which is equivalent to a further rotation by 180° and changes 90° to -90°). --Tardis (talk) 02:13, 1 September 2010 (UTC)
- I was multiplying a row vector on the left and the matrix on the right. That would be my mistake. Thank you for taking the time. -Jordgette (talk) 07:04, 1 September 2010 (UTC)
Convert procedure to formula?
[edit]How do I convert something like: if(x>50) y=(30+x), else y=(x/2), to an equation of the form y = f(x)?
Is this a standard 'area' of mathematics, if so what is it called, and where can I go online to learn it?
I have also seen precedures that involve for/while loops that I know should be representable as a single mathemtical function and shouldn't need interation. But I have no clue how to build a function from the procedure. Can anyone point me in the right direction? Thanks.--Dacium (talk) 03:27, 1 September 2010 (UTC)
- To answer the first part of your question, it looks like what you want is a Piecewise function... the value of x (i.e., where it is in the domain) determines which piece of the function you're using to evaluate the dependent variable:
.
Essentially it's saying the same thing that you've expressed as an "if-else" or another programming function that involves selecting cases based on the input. --Kinu t/c 03:50, 1 September 2010 (UTC)
Selecting cases is avoided by using Iverson brackets: y=[x>50]·(30+x)+[x≤50]·(x/2). For-loops are avoided by using J. Bo Jacoby (talk) 05:58, 1 September 2010 (UTC).
- You could also use Recursion to avoid for loops.
- For some for loops it may be posible to replace the loop by a simple formula without recursion. For instance
sum =0; for i=1 to n: sum=sum+i;
is an arithmetic progression and could be replace by the simple function . Similar results could be obtained for other loops but I'm not aware of a general procedure, the article Series (mathematics) might be of help.--Salix (talk): 08:45, 1 September 2010 (UTC)
Corresponding J expressions may be written
n=.10 +/1+i.n NB. brute force summation without for loop 55 n*(n+1)%2 NB. computing the sum 55
Salix alba ment to write . Bo Jacoby (talk) 10:08, 1 September 2010 (UTC)
Another number theory problem
[edit]I have two problems:
- If p is an odd prime, show that every prime divisor of must be of the form 2pk+1 for some natural number k.
- If are the Fibonacci numbers then show that Euclid's algorithm takes n steps to determine gcd. I have been racking my brain on this one (the first one I have no idea about), using induction etc but to no avail. -Shahab (talk) 13:05, 1 September 2010 (UTC)
- The second one's pretty trivial: the Euclidean algorithm constructs a sequence of numbers, whose first two elements are fn+2 and fn+1. What is the third element?—Emil J. 13:11, 1 September 2010 (UTC)
- As for the first one: you want to show that , or in other words, . You can work mod 2 and mod p separately, as p is odd. The rest is Fermat's little theorem.—Emil J. 13:19, 1 September 2010 (UTC)
- Thanks Emil for part 2. But for the 1st part I dont understand as to how you concluded that I wished to show or equivalently for some k. Could you be a little more explicit. Thanks-Shahab (talk) 14:05, 1 September 2010 (UTC)
- Sorry, I misread the question. So, we have a prime divisor q | 2p − 1, and we want to show that . It's clear mod 2, so we only need it mod p. Now, consider the multiplicative order k of 2 modulo q. The assumption gives k | p, and Fermat's little theorem gives k | q − 1. Conclude p | q − 1.—Emil J. 14:16, 1 September 2010 (UTC)
- Thanks. I have another problem, (sorry for posting so many, I am appearing for an exam after a long long time). If gcd(a,b,c)lcm[a,b,c]=abc then show that (a,b)=(b,c)=(c,a)=1.-Shahab (talk) 21:33, 1 September 2010 (UTC)
- Hi Shahab. For any prime let the nonnegative integers be the exponents of the greatest powers of that divide respectively . Then , and from this you have to deduce that at most one out of is positive (meaning that divides at most one out of ). You may think w.l.o.g. that of course.--pma 00:38, 2 September 2010 (UTC)
- Thanks pma. I hope you are doing well.
- Hi Shahab. For any prime let the nonnegative integers be the exponents of the greatest powers of that divide respectively . Then , and from this you have to deduce that at most one out of is positive (meaning that divides at most one out of ). You may think w.l.o.g. that of course.--pma 00:38, 2 September 2010 (UTC)
- Thanks. I have another problem, (sorry for posting so many, I am appearing for an exam after a long long time). If gcd(a,b,c)lcm[a,b,c]=abc then show that (a,b)=(b,c)=(c,a)=1.-Shahab (talk) 21:33, 1 September 2010 (UTC)
- Sorry, I misread the question. So, we have a prime divisor q | 2p − 1, and we want to show that . It's clear mod 2, so we only need it mod p. Now, consider the multiplicative order k of 2 modulo q. The assumption gives k | p, and Fermat's little theorem gives k | q − 1. Conclude p | q − 1.—Emil J. 14:16, 1 September 2010 (UTC)
- Thanks Emil for part 2. But for the 1st part I dont understand as to how you concluded that I wished to show or equivalently for some k. Could you be a little more explicit. Thanks-Shahab (talk) 14:05, 1 September 2010 (UTC)
Name of a curve
[edit]Say A is an arbitrary smooth curve, and P is some point on that curve. I draw a line normal to A through P, and I mark off point Q on the line such that PQ is some constant distance. I then trace the locus of Q as P moves along A, thus forming a new curve B. Is there a name for the relationship between curves A and B? I vaguely had in mind "evolute", but looking that up I see it means something completely different.—Preceding unsigned comment added by 86.135.28.150 (talk) 13:59, 1 September 2010 (UTC)
- B is more or less a parallel curve of A.—Emil J. 14:07, 1 September 2010 (UTC)
- Yes, it is indeed a parallel curve. I have added this ref (the first) to Parallel curve. DVdm (talk) 14:21, 1 September 2010 (UTC)
- Thanks (duh). 86.184.27.6 (talk) 17:14, 1 September 2010 (UTC)
- Yes, it is indeed a parallel curve. I have added this ref (the first) to Parallel curve. DVdm (talk) 14:21, 1 September 2010 (UTC)