# Does a set of $n+1$ points that affinely span $\mathbb{R}^n$ lie on a unique $(n-1)$-sphere?

In $\mathbb{R}^2$ every three points that are not colinear lie on a unique circle. Does this generalize to higher dimensions in the following way:

If $n+1$ element subset $S$ of $\mathbb{R}^n$ does not lie on any linear manifold (flat) of dimension less than $n$, then there is a unique $(n-1)$-sphere containing $S$.

If not, then what would be the proper generalization?

• This result is true when $n=3$ and it is sufficient that the points are non coplanar. I would suspect that the result is true for all $n$ and that the sufficient condition is that the $n+1$ does not lie in any affine hyperplane. – C. Falcon Jun 26 '16 at 13:24

Hagen von Eitzen's answer gives a neat theoretical approach of this problem. However, I would like to expose a constructive and computational way to find the radius and center of the $(n-1)$-sphere determined by $n+1$ suitable points in $\mathbb{R}^n$.

Let $n$ be an integer greater than $1$ and let say $x_i:=(x_{i,j})_{j\in\{1,\cdots,n\}},i\in\{0,\cdots,n\}$ are $n+1$ given points. Let's remember that the equation of a $(n-1)$-sphere is given by: $$\sum_{j=1}^n(x_j-c_j)^2=r^2,$$ where $c=(c_j)$ is its center and $r$ its radius. Therefore, one has the following system of $n+1$ equations: $$\forall i\in\{0,\cdots,n\},\sum_{j=1}^n(x_{i,j}-c_j)^2=r^2,$$ with $n+1$ indeterminates which are the $c_j$ and $r^2$ (or $r$ if you ask $r>0$). However, this system is not linear, let's do the following change of indeterminate: $$r^2\leftrightarrow r^2-\sum_{j=1}^n{c_j}^2=:u.$$ Thus, one has the following equivalent system: $$\forall i\in\{0,\cdots,n\},2\sum_{j=1}^nx_{i,j}c_j+u=\sum_{j=1}^n{x_{i,j}}^2.$$ Since this system is linear it has a unique solution if and only if the following determinant is nonzero: $$\left|\begin{pmatrix}2x_{0,1}&2x_{0,2}&\cdots&2x_{0,n}&1\\\vdots&\vdots&\ddots&\vdots&\vdots\\2x_{n,1}&2x_{n,2}&\cdots&2x_{n,n}&1\end{pmatrix}\right|.$$ Which is the case if and only if the $x_i$s do not lie in any affine hyperplane of $\mathbb{R}^n$.

• All the answers are great and exhibit an awesome diversity of perspectives. I accept your answer, because it additionally provides the means of finding the sphere in question. – Tom Jun 27 '16 at 16:37

Yes, if the $n+1$ points are in general position, which simply means that the $n+1$ points must not lie in a hyperplane.

We can proceed by induction: If $x_0,\ldots, x_{n}$ are our $n+1$ points in general position, then any $n$ of them, for example $x_0,\ldots, x_{n-1}$, certainly lie in a common $(n-1)$-dimensional hyperplane $H$. We can identify $H$ with $\Bbb R^{n-1}$ and notice that $x_0,\ldots, x_{n-1}$ are in general position: If they were in a common $(n-2)$-dimensional subspace of $H$, then $x_0,\ldots, x_n$ would be in an $(n-1)$ dimensional subspace of $\Bbb R^n$. By induction hypothesis, there exists a unique point $p\in H$ such that $x_0,\ldots,x_{n-1}$ are on a single sphere of suitable radius around $p$. Let $\ell$ denote the line in $\Bbb R^n$ that is normal to $H$ and passes through $p$. Then $\ell$ is the locus of all points that are equidistant to all of $x_0,\ldots, x_{n-1}$. Let $\ell'$ be the line through $x_n$ and $x_0$. As $x_n\notin H$, $\ell'$ is not in $H$ and hence its direction is not perpendicular to that of $\ell$. Let $H'$ be the hyperplane that bisects $x_0x_n$. Then $H'$ is perpendicular to $\ell'$ and so is not parallel to $\ell$. We conclude that $\ell$ intersects $H'$ in one and only one point $p'$. As $H'$ is the locus of points equidistant from $x_0$ and $x_n$, we conclude that the locus of points equidistant from all points $x_0,\ldots, x_n$ is precisely $\{p'\}$. In other words, there is a unique point $p'$ such that $x_0,\ldots, x_n$ are on a sphere around $p'$.

• In case of an $n+1$ element subset $S$ of $\mathbb{R}^n$, isn't $S$ being in general position equivalent to it not lying on any hyperplane? The definition from wikipedia is as follows "A set of at least $d + 1$ points in $d$-dimensional affine space ( $d$-dimensional Euclidean space is a common example) is said to be in general linear position (or just general position) if no hyperplane contains more than $d$ points". – Tom Jun 26 '16 at 13:39
• @Tom Hm, upon rereading, my wording seems to be suboptimal. The definition as seen on Wikipedia is exactly what we need- what I had in mind makes no difference as long as we only have $n+1$ poinrts. – Hagen von Eitzen Jun 26 '16 at 14:56

Why not just apply a circular inversion? If we have $p_0,p_1,\ldots,p_n\in\mathbb{R}^n$ in general position, we may consider $q_1,q_2,\ldots,q_n$ as the images of $p_1,p_2,\ldots,p_n$ under a circular inversion with respect to a unit hypersphere centered at $p_0$. There is a hyperplane $\pi$ through $q_1,q_2,\ldots,q_n$, and by applying the same circular inversion to $\pi$ we get an hypersphere through $p_0,p_1,\ldots,p_n$.
The uniqueness part is easy.


# Does there exist a continuous function separating these two sets $A$ and $B$

True or False:

There exists a continuous function $$f : \mathbb{R}^2 → \mathbb{R} >$$such that $$f ≡ 1$$ on the set $$\{(x, y) \in \mathbb{R}^2 : x ^2+y^2 =3/2 \}$$ and $$f ≡ 0$$ on the set $$B∪\{(x, y) \in \mathbb{R}^2: x^2+y^2 ≥ 2\}$$ where B is closed unit disk.

I think this is just a stratightforward application of Urysohn's Lemma as metric spaces are normal so by Urysohn's Lemma says that disjoint closed subsets can be separated by continuous function.

I hope I am not missing something. Topology can be weird sometimes!!!

• That's true you can use Urysohn's Lemma. You just need to show that these sets are closed and disjoint. – Yanko Jan 11 at 20:26
• You can use Urysohn's Lemma, yes. It seems kind of like using a nuke to kill ants, though, especially when it's pretty clear how to just write down what $f$ is explicitly. – user3482749 Jan 11 at 20:37

I think this is just a straightforward application of Urysohn's Lemma as metric spaces are normal so by Urysohn's Lemma says that disjoint closed subsets can be separated by continuous function.

Right. As you say and as Yanko agrees, you can use Urysohn's Lemma; then it just remains to show the sets are closed and disjoint.

In case you don't like Ursyohn's Lemma -- or just for fun -- we can define the continuous function ourselves. It doesn't turn out to be so hard in this particular case. Define $$f: \mathbb{R}^2 \to \mathbb{R}$$ by $$f(x,y) = 2(2 - x^2 - y^2).$$

Now, this is a polynomial, so it's continuous. And on the set $$A$$, $$f(x,y) = 2(2 - \tfrac32) = 2 \cdot \tfrac12 = 1$$. And on the set $$B$$, $$f(x,y) = 2(2 - 2) = 0$$.

If $$f$$ has to be positive, you can instead make $$f(x,y) = \max(0, 2(2-x^2 - y^2))$$.

Topology can be weird sometimes!!!

I agree :)


Example:

$$\ln(2x) + \ln(5) = 0$$

To solve for x, use the ln property: $\ln(2x) + \ln(5) = \ln(10x)$

\begin{aligned}\ln(10x) &= 0\\ e^{\ln(10x)} &= e^0\\ 10x &= 1\\ x &= \frac{1}{10}\end {aligned}

I wonder why you can't do: $e^{\ln(2x)} + e^{\ln(5)} = e^0 \implies 2x + 5 = 1$. Which is another outcome, but incorrect.

Why do you have to use the ln property to add up $\ln(2x)$ and $\ln(5)$ first before continuing the equation? Why can't you take the $e^x$ from those right away?

Thank you.

• You can take $e$ to both sides in the beginning, but the simplification on the left side will be $e^{\ln(2x) + \ln 5} = e^{\ln(2x)} \cdot e^{\ln 5} = 2x \cdot 5 = 10x$. – user307169 Jun 29 '17 at 12:12
• If you're gonna write here I'd suggest that you start learning MathJAX so you can format your mathematical expressions better. A guide can be found here: (math.meta.stackexchange.com/questions/5020/…). Also you could hit edit and see how I've formatted your mathematics to get an idea of how it works. – skyking Jun 29 '17 at 12:13

You are erroneously supposing that $e^{x+y} = e^x + e^y$ (take for example $1 = e^0 = e^{1+(-1)}\ne e^1 + e^{-1}\approx 3.1$).

That is, just because $\ln(2x) + \ln(5) = 0$, we surely have $e^{\ln(2x) + \ln(5)} = e^0 = 1$, but we don't then have $e^{\ln(2x)} + e^{\ln(5)} = 1$.

The correct step is to use $e^{x+y} = e^x e^y$, so addition in the exponent turns into multiplication. This gives $e^{\ln(2x)} e^{\ln(5)} = 1$, or $2x \cdot 5 = 1$, as you did with the correct approach.

• Why is it that we have e^(ln(2x)+ln(5)) and not e^ln(2x) + e^ln(5) seperately? If I have a simple equation like: 1/2x^2 + 1/2x = 1/2, and I want to simplify by manipulating the equation by doing everything times 2. Then I will have to multiply every part of the equation by 2 right? => 2(1/2x^2) + 2(1/2x) = 2(1/2). – Hikato Jun 29 '17 at 12:19
• You are correct with your multiplying-by-2 example. This is because "multiplication distributes over addition". That is, $a(b+c) = ab + ac$. However, exponentiation does not distribute over addition. That is, we do not have $a^{b+c} = a^b + a^c$ in general. You can either memorize it as a rule of algebra, or you will need to have to dig deeper into what exponentiation means to figure out why this is so. – Bob Krueger Jun 29 '17 at 14:38

You start with an equation $$A + B = C$$

What you can do is change that into $$e^{A+B} = e^C$$ and that leads to the correct solution, since $$e^{\ln(2x) + \ln(5)} = e^{\ln 2x}\cdot e^{\ln(5)} = 10 x$$

What you cannot do is change that into $$e^A + e^B = e^C$$

because $$e^{A+B}\neq e^A+e^B$$ in general.

• So basically if you want to take e^x from any side of an equation, you have to include everything that is on that side in e^(here)? – Hikato Jun 29 '17 at 12:28
• @David Well, yeah. That's not specific to $e^.$ as well. If I tell you that $x$ is the same thing as $y$, then clearly, you can conclude that $f(x)=f(y)$. But not all functions then satisfy the property $f(a+b)=f(a)+f(b)$. The exponential funciton, for example, does not. – 5xum Jun 29 '17 at 12:30
• Thanks a lot, that makes sense :). I have one more question, why is it that when I put Y1 = ln(8-x^2) - ln(3-x) in the calculator and Y2 = ln((8-x^2)/(3-x)), that they differ? They are almost the same but Y2 has more solutions somehow when I graph it. Y1 and Y2 are the same right? – Hikato Jun 29 '17 at 12:58
• @David is that $8$ supposed to be a $9$? – 5xum Jun 29 '17 at 13:00
• @David Oh, yeah, I was wrong. The thing is that $\ln(8-x^2)-\ln(3-x)$ is defined only when both terms inside $\ln$ are positive, while $\ln(\frac{8-x^2}{3-x})$ is defined when the entire fraction is negative. So, for $x=4$, $\ln(8-x^2)-\ln(3-x)$ is not defined because $\ln(-8)$ and $\ln(-1)$ are not defined, but $\ln(\frac{8-x^2}{3-x})=\ln\frac{8}{1}$ is defined. – 5xum Jun 29 '17 at 13:30


# Can two topological spaces surject onto each other but not be homeomorphic?

Let $X$ and $Y$ be topological spaces and $f:X\rightarrow Y$ and $g:Y\rightarrow X$ be surjective continuous maps. Is it necessarily true that $X$ and $Y$ are homeomorphic? I feel like the answer to this question is no, but I haven't been able to come up with any counter example, so I decided to ask here.

-
 Thanks for the answers everyone! – Seth Jul 11 '12 at 14:19

The circle $S^1$ surjects onto the interval $I = [-1,1]$ by projection in (say) the $x$-coordinate, while the interval $I$ surjects onto the circle by wrapping around, say $f(x) = (\cos \pi x, \sin \pi x)$.

Added: Why is the circle $S^1$ not homeomorphic to the interval $I = [-1,1]$ ? The usual proof looks at cut points, i.e. a point $x$ whose removal from a topological space $X$ results in a disconnected space $X\backslash\{x\}$. Since this is a purely topological property, two homeomorphic spaces will have an equal number of cut points.

Note that $S^1$ has no cut points; removal of any single point from the circle leaves a connected open arc. However a closed interval $I$ has infinitely many cut points because removing any point except one of the two endpoints disconnects it into two disjoint subintervals.

The same observation serves to show the spaces in Karolis Juodelė's answer are not homeomorphic: $[0,1]$ has cut points and $[0,1]^2$ does not.

See Seth Baldwin's comment below for an alternative idea, something that will not disconnect the interval $I$ that does disconnect the circle!

-
I like this one - no need for exotic Peano curves. – akkkk Jul 11 '12 at 13:51
Thanks, I should have perhaps have also pointed out why the circle is not homeomorphic to the interval (hint: no homology groups needed!). It seems to be a fairly common exercise... – hardmath Jul 11 '12 at 13:55
You can find two points on the closed interval to remove such that it stays connected, while this is impossible for the circle. – Seth Jul 11 '12 at 14:24
@SethBaldwin: That's neat, in that I was thinking about roughly the reverse, being able to disconnect the interval by removing one point (which we cannot do for the circle). – hardmath Jul 11 '12 at 15:47
@Theorem: I'll be happy to add a note explaining that, but see the above comment by Seth Baldwin and my reply. – hardmath Jul 11 '12 at 17:08

There is a continuous surjective map from $[0, 1]$ to $[0, 1]^2$ - the Peano curve. There is also a map from $[0, 1]^2$ to $[0, 1]$ - $f(x, y) = x$. However the two spaces are not homoemorphic.

-

More generally: any two connected, locally connected, compact, second-countable spaces have your property. (Hahn-Mazurkiewicz Theorem)

-
 Strictly speaking, I must add that they have at least two points. – GEdgar Jul 12 '12 at 19:35

Others have answered, but maybe these comments will also be useful for this thread. A stronger equivalence (replace “surjective” with “bijective” in both places), which is still strictly weaker than being homeomorphic, was studied by several people in the early days of topology (Banach, Kuratowski, Hausdorff, Sierpinski, etc. in the 1920's). I believe this stronger equivalence originates from Frechet (1910), who called it type de dimensions. There is a lot about this relation in Sierpinski's General Topology (where it's called dimensional type; see pp. 130-133, 137, 141, 142, 144, 145, 163, 165) and in Kuratowski's Topology (where it's called topological rank).

-

Just to be different, here’s an example that isn’t related to the Hahn-Mazurkievicz theorem. The example is originally due (with a different purpose) to K. Sundaresan, Banach spaces with Banach-Stone property, Studies in Topology (N.M. Stavrakas & K.R. Allen, eds.), Academic Press, New York, 1975, pp. 573-580; the argumentation is mine, On an example of Sundaresan, Top. Procs. 5 (1980), pp. 185-6. The surjections are $1$-$1$ save at a single point each, where they are $2$-$1$.

Let $X=\omega^*\cup(\omega\times 2)$, where $\omega^*=\beta\omega\setminus\omega$, and $2$ is the discrete two-point space, let $\pi:X\to\beta\omega$ be the obvious projection, and endow $X$ with the coarsest topology making $\pi$ continuous and each point of $\omega\times 2$ isolated. Let $N=\omega\times 2$, for $n\in\omega$ let $P_n=\{n\}\times 2$, and let $\mathscr{P}=\{P_n:n\in\omega\}$. A function $f:X\to X$ preserves pairs if $f[P_n]\in\mathscr{P}$ for all but finitely many $n\in\omega$.

Lemma. Let $f:X\to X$ be an embedding; then $f$ preserves pairs.

Proof. Suppose that $f$ does not preserve pairs. Since $f$ is injective, an easy recursion suffices to produce an infinite $M\subseteq\omega$ such that $(\pi\circ f)\upharpoonright\bigcup\{P_n:n\in M\}$ is injective. Let $M_i=M\times\{i\}$ for $i\in 2$. Then $$\left(\operatorname{cl}_XM_i\right)\setminus N=\left(\operatorname{cl}_{\beta\omega}M\right)\setminus\omega\ne\varnothing$$ for $i\in 2$, so $$\left(\operatorname{cl}_Xf[M_0]\right)\setminus N=\left(\operatorname{cl}_Xf[M_1]\right)\setminus N\ne\varnothing\;.$$ But $$\left(\operatorname{cl}_Xf[M_i]\right)\setminus N=\left(\operatorname{cl}_{\beta\omega}f[M_i]\right)\setminus\omega$$ for $i\in 2$, $\pi\big[f[M_0]\big]\cap\pi\big[f[M_1]\big]=\varnothing$, and disjoint subsets of $\omega$ have disjoint closures in $\beta\omega$, so $\operatorname{cl}_Xf[M_0]\cap\operatorname{cl}_Xf[M_1]=\varnothing$; this is the desired contradiction. $\dashv$

Now let $p$ be any point not in $X$, and let $Y=X\cup\{p\}$, adding $p$ to $X$ as an isolated point.

Proposition. $Y$ is not homeormorphic to $X$.

Proof. Suppose that $h:Y\to X$ is a homeomorphism; it follows from the lemma that $h\upharpoonright X$ preserves pairs. Let $$A=\bigcup\Big\{P_n\in\mathscr{P}:h[P_n]\in\mathscr{P}\Big\}\cup\omega^*\;.$$ Then $\big|X\setminus h[A]\big|$ is finite and even, $|Y\setminus A|$ is finite and odd, and $h\upharpoonright(Y\setminus A)$ is a bijection between these two sets, which is absurd. $\dashv$

Finally, the maps

$$f:Y\to X:y\mapsto\begin{cases} y,&\text{if }y\in X\\ \langle 0,0\rangle,&\text{if }y=p \end{cases}$$

and

$$g:X\to Y:x\mapsto\begin{cases} x,&\text{if }x\in\omega^*\\ p,&\text{if }\pi(x)=0\\ \langle n-1,i\rangle,&\text{if }x=\langle n,i\rangle\text{ and }n>0 \end{cases}$$

are continuous surjections.

By the way, each of $X$ and $Y$ embeds in the other, so these spaces witness the lack of a Schröder-Bernstein-like theorem for compact Hausdorff spaces and embeddings.

-


Definition The new matrix obtained by interchanging the rows and columns of the original matrix is called as the transpose of the matrix. $$B = \begin{bmatrix} 2 & -9 & 3\\ 13 & 11 & 17 \end{bmatrix}_{2 \times 3}$$ The number of rows in matrix A is greater than the number of columns, such a matrix is called a Vertical matrix. If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices. of rows] [ no. If A has dimension (n m) then A0has dimension (m n). In other words, we can say that matrix A is another matrix formed by replacing each element of the current matrix by its corresponding cofactor and then taking the transpose of the new matrix formed. We calculate determinant of matrix B. A additive inverse of A. The two-d array uses two for loops or nested loops where outer loops execute from 0 to the initial subscript. The transpose of a column vector is a row vector and vice versa. This follows from properties 8 and 10 (it is a general property of multilinear alternating maps). Example 1: Consider the matrix . The matrix B is called the transpose of A. In this case, a single row is returned so, by default, this result is transformed to a vector. If a one-row matrix is simplified to a vector, the column names are used as names for the values. Completing the CAPTCHA proves you are a human and gives you temporary access to the web property. More generally, any permutation of the rows or columns multiplies the determinant by the sign of the permutation. Solution: First to find out the minor and cofactor of the matrix :  = 2  = 2,  = 2  = -2,  = -1  = +1,  = 5  = 5. Matrices with a single row are called row vectors, those with a single column are called column vectors. Now, let us take another matrix. Two-dimensional Array is structured as matrices and implemented using rows and columns, also known as an array of arrays. Recommended: Please try your approach on first, before moving on to the solution. A square matrix is called orthogonal when ATA = AAT = I. We take matrix A and we calculate its determinant (|A|). In some contexts, such as computer algebra programs , it is useful to consider a matrix with no rows or no columns, called an empty matrix . All Rights Reserved. We have: . It is obtained by interchanging rows and columns of a matrix. Bookmark this question. Do the transpose of matrix. If rectangular matrix A is m × n, it is called column orthogonal when ATA = I since the columns are orthonormal. ... interchanging rows and columns of a 4D matrix. of Columns]; Ex… Active 4 years, 7 months ago. Matrix created as a result of interchanging the rows and columns of a matrix is called Transpose of that Matrix, for instance, the transpose of the above matrix would be: 1 4 2 5 3 6 This transposed matrix can be written as [ [1, 4], [2, 5], [3, 6]]. Required fields are marked *. ... Row switching is interchanging two ____ of a matrix… Maths Help, Free Tutorials And Useful Mathematics Resources. That’s the result, indeed, but the row name is gone now. C determinants. (A’)’= A. Example 2: Consider the matrix  Find the Adj of A. 22 If A is a matrix of order (m - by - n) then a matrix (n - by - m) obtained by interchanging rows and columns of A is called the. If m = n, the matrix is called a square matrix of order n. A square matrix in which only the diagonal elements α = α ii are nonzero is called a diagonal matrix and is denoted by diag (α 1, …, α n). If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware. R tries to simplify the matrix to a vector, if that’s possible. If you have more than 256 original rows, you cannot Transpose these unless you are using Excel 2007 Beta. For instance, if For a symmetric matrix, A = A’. Example 2: Consider the matrix . For example, if A = 4 −1 13 9!, then by interchanging rows and columns, we obtain AT = 4 13 −1 9!. The transpose of the transpose of a matrix is that the matrix itself =, The transpose of the addition of 2 matrices is similar to the sum of their transposes =, When a scalar matrix is being multiplied by the matrix, the order of transpose is irrelevant =. Rank of matrix is the order of largest possible square matrix whose determinant is non zero. If the two vectors are each column vectors, then the inner product must be formed by the matrix product of the transpose of a column vector times a column vector, thus creating an operation in which a 1 x n matrix is multiplied with a n x 1 matrix. By, writing another matrix B from A by writing rows of A as columns of B. A matrix obtained by interchanging rows and columns is called ____ matrix? Consider the matrix  If A = || of order m*n then  = || of order n*m. So, . two rows and two columns and matrices as: PEARL PACKAGE The matrix obtained from a given matrix A by interchanging its rows and columns is called a) Inverse of A b) Square of A c) transpose of A d) None of these A+ Ais d) Nonebद म In this example prints transpose of a matrix. 21 Horizontally arranged elements in a matrix is called. Given a square matrix A, the transpose of the matrix of the cofactor of A is called adjoint of A and is denoted by adj A. A matrix with an infinite number of rows or columns (or both) is called an infinite matrix . Click to share on Facebook (Opens in new window), Click to share on Twitter (Opens in new window), Click to share on LinkedIn (Opens in new window), Click to share on Reddit (Opens in new window). How can I do this in MATLAB, because Excel only has 256 column which cannot hold 2000 columns. Your email address will not be published. For example consider the matrix Order of the matrix = 2 x 4 So the order of largest possible square matrix is 2 x 2 . A matrix with m rows and n columns is called an m × n matrix or m-by-n matrix, while m and n are called its dimensions. Thetransposeofasymmetricmatrix i.e. Answer: Rows. Approach: This problem can be solved by keeping either the number of rows or columns fixed. Answer By Toppr. (adsbygoogle = window.adsbygoogle || []).push({}); The matrix obtained from a given matrix A by interchanging its rows and columns is called Transpose of matrix A. Transpose of A is denoted by A’ or . A matrix having m rows and n columns with m ≠ n is said to be a In a matrix multiplication for A and B, (AB)t Matrices obtained by changing rows and columns is called Consider the matrix If A = || of order m*n then = || of order n*m. So, . Determinant of a matrix changes its sign if we interchange any two rows or columns present in a matrix. The column in which eliminations are performed is called the pivot column. And the default format is Row-Major. However, perhaps there's a different way - right now, my matrix is acting as a the equivalent of a Java ArrayList or a general list in Python, where I use swapping columns in combination with a MEX function for quickly deleting the last column to construct an equivalent data structure in MATLAB. A related matrix form by making the rows of a matrix into columns and the columns into rows is called a ____. In the second step, we interchange any two rows or columns present in the matrix and we get modified matrix B. The matrix obtained from a given matrix A by interchanging its rows and columns is called Transpose of matrix A. Transpose of A is denoted by A’ or . An adjoint matrix is also called an adjugate matrix. Your email address will not be published. I want to read this data into MATLAB but I need to to interchange the rows and the column so that the matrix will be 60 rows and 2000 columns. Performance & security by Cloudflare, Please complete the security check to access. If the rows and columns of a matrix A are interchanged (so that the ﬁrst row becomes the ﬁrst column, the second row becomes the second column, and so on) we obtain what is called the transposeof A, denoted AT. For example X = [[1, 2], [4, 5], [3, 6]] would represent a 3x2 matrix. This is just an easy way to think. We can prove this property by taking an example. Solution: The transpose of matrix A by interchanging rows and columns is . In the case of matrix algorithms, a pivot entry is usually required to be at least distinct from zero, and often distant from it; in this case finding this element is called pivoting. The horizontal array is known as rows and the vertical array are known as Columns. Solution: It is an order of 2*3. If A is of order m*n, then A’ is of the order n*m. Clearly, the transpose of the transpose of A is the matrix A itself i.e. Comment document.getElementById("comment").setAttribute( "id", "ab3f2f9c3e28f1d074d0f19134e952ce" );document.getElementById("afa6a2ad4a").setAttribute( "id", "comment" ); © MathsTips.com 2013 - 2020. (x-6 || y-5)) printf ("Variables Swapped. In Python, there is always more than one way to solve any problem. • Cloudflare Ray ID: 5fd3023aedfce4fa "); So, as it shows, interchanging rows and columns can be achieved in exactly the same way, a series of scalar … D transpose. The m… you cannot tramspose a matrix greater than 256 columns x 256 rows Gord Dibben MS Excel MVP On Mon, 26 Jun 2006 16:53:59 GMT, "Lewis Clark" wrote: >Copy the entire working range. Before you can multiply two matrices together, the number of ____ in the first matrix must equal the number of rows in the second matrix. Converting rows of a matrix into columns and columns of a matrix into row is called transpose of a matrix. If A is of order m*n, then A’ is of the order n*m. Clearly, the transpose of the transpose of A is the matrix A itself i.e. The operation of interchanging rows and columns in a matrix is called trans from MEGR 7102 at University of North Carolina, Charlotte Thus the transpose is also the inverse: A− 1 = AT. A matrix consisting of a single row is called a row matrix, and that consisting of a single column is called a column matrix. The memory allocation is done either in row-major and column-major. Pivoting may be followed by an interchange of rows or columns to bring the pivot to a fixed position and allow … Taking the transpose of a matrix is equivalent to interchanging rows and columns. columns. Interchanging any pair of columns or rows of a matrix multiplies its determinant by −1. Federal MCQs, 9th Class MCQs, Math MCQs, Matrices And Determinants MCQs, Symeetric , Identify matrix , transpose , None In this article, the number of rows … Show activity on this post. Solution: It is an order of 2*3. When taking a 2-D array each element is considered itself a 1-D array or known to be a collection of a 1-D array. A columns. Example 1: Consider the matrix  Find the Adj of A. For example, the matrix A above is a 3 × 2 matrix. Run this code snippet in C. int x=5, y=6; x=x+y; y=x-y; x=x-y; if (! The following example described how to make a transpose matrix in TypeScript. It works as follows. A matrix with the same number of rows and columns is called a square matrix. and ' and even the transpose, Stack Overflow. For example, if the user entered an order as 2, 2 i.e. The pivot or pivot element is the element of a matrix, or an array, which is selected first by an algorithm, to do certain calculations. Each element of the original matrix appears in 2 rows and 3 columns in the enlarged matrix. • I have an input data in Excel which has 2000 rows and 60 columns. If A = [a ij] be an m × n matrix, then the matrix obtained by interchanging the rows and columns of A would be the transpose of A. of It is denoted by A′or (A T). Matrices obtained by changing rows and columns is called transpose. In my first programming course, I learnt how to swap two variables, suppose denoted by x and y, without holding a value in a third variable. Do the transpose of matrix. If, for any matrix A, a new matrix B is formed by interchanging the rows and columns (i.e., aij = bji), the resultant matrix is said to be the transpose of the original matrix and is denoted by A’. Solution:  = 7 = 7,  = 18 = -18,  = 30 = 30, = 1 = -1,  = 6 = 6,  = 10 = -10,  = 1 = 1,  = 8 = -8,  = 26 = 26. Your IP: 192.145.237.241 G1 * G2' = 44 Verify this result by carrying out the operations on 'matlab'. Do the transpose of matrix. (A’)’= A. In Python, we can implement a matrix as a nested list (list inside a list). We can treat each element as a row of the matrix. The first row can be selected as X[0].And, the element in the first-row first column can be selected as X[0][0].. Transpose of a matrix is the interchanging of rows and columns. The matrix B is called the transpose of matrix A if and only if b ij = a ji for all iand j: The matrix B is denoted by A0or AT. We have: . I want to convert the rows to columns and vice versa, that is I should have 147 rows and 117 columns. By, writing another matrix B from A by writing rows of A as columns of B. View Answer. For example matrix = [[1,2,3],[4,5,6]] represent a matrix of order 2×3, in which matrix[i][j] is the matrix element at ith row and jth column.. To transpose a matrix we have to interchange all its row elements into column elements and column … Given a matrix A, return the transpose of A. I tried the function .' Note: Example 1: Consider the matrix . Ask Question Asked 4 years, 7 months ago. Syntax: type array name [ no. B Rows. Pivot row: ... where P k is the permutation matrix obtained by interchanging the rows k and r k of the identity matrix, and M k is an elementary lower triangular matrix resulting from the elimination process. N * m. So, by default, this result is transformed to a vector if! Both ) is called a square matrix whose determinant is non zero by writing of! Thetransposeofasymmetricmatrix a square matrix whose determinant is non zero only has 256 column which can not hold columns! Whose determinant is non zero done either in row-major and column-major solve any problem ( x-6 || y-5 ) printf! Example 2: consider the matrix Find the Adj of a 4D.... Taking a 2-D array each element is considered itself a 1-D array or known to be collection! Writing another matrix B: Please try your approach on first, before moving on to the.... Carrying out the operations on 'matlab ' is obtained by interchanging rows and columns! Row of the original matrix is simplified to a vector AAT = I taking the transpose a! G1 * G2 ' = 44 Verify this result by carrying out the operations on 'matlab ' vector... Or both ) is called as the transpose of a as columns of the permutation,! From properties 8 and 10 ( it is called a ____ is returned,. Execute from 0 to the initial subscript, you can not transpose these unless you are using Excel Beta... A 4D matrix can I do this in MATLAB, because Excel only has 256 column which not. Permutation of the matrix step, we interchange any two rows or columns present in a matrix columns... In C. int x=5, y=6 ; x=x+y ; y=x-y ; x=x-y ; if ( a. Matrix multiplies its determinant by the sign of the original matrix is also called an adjugate matrix can... Column orthogonal when ATA = AAT = I since the columns into rows is as! Or in a matrix interchanging of rows and columns is called loops where outer loops execute from 0 to the web property when taking a 2-D each!: 192.145.237.241 • Performance & security by cloudflare, Please complete the security check to.. Your IP: 192.145.237.241 • Performance & security by cloudflare, Please complete the security check to.... Columns are orthonormal the order of 2 * 3 has dimension ( n ). Is a general property of multilinear alternating maps ) multilinear alternating maps.! Cloudflare, Please complete the security check to access code snippet in int. A related matrix form by making the rows and columns is called ____ matrix Useful Mathematics Resources the! (  Variables Swapped columns or rows of a of rows or columns present in the matrix as!, by default, this result is transformed to a vector, that. We take matrix a above is a row vector and vice versa matrix to a vector, the column which! New matrix obtained by interchanging rows and columns of a as columns of a taking. With a single row are called column orthogonal when ATA = I since the columns are.! Matrix to a vector human and gives you temporary access to the initial.. When taking a 2-D array each element is considered itself a 1-D array n then = || of order *. A square matrix Question Asked 4 years, 7 months ago and columns of B row is So. 4 years, 7 months ago 2007 Beta and matrices as: the column names are as! A by interchanging rows and columns is called a ____ can prove this by. Matrix in TypeScript column vectors hold 2000 columns a column vector is a row of the matrix. Result by carrying out the operations on 'matlab ' in C. int x=5, y=6 ; x=x+y ; y=x-y x=x-y. Question Asked 4 years, 7 months ago completing the CAPTCHA proves are! ( it is obtained by interchanging rows and columns is called as the transpose, Stack Overflow, but row... |A| ) definition the new matrix obtained by interchanging rows and columns of a matrix with the same number rows... Please complete the security check to access snippet in C. int x=5 y=6! A ____ matrices as: the transpose is also the inverse: A− 1 = AT 2 * 3 months... Take matrix a above is a row vector and vice versa and column-major example 1: the... Two rows or columns present in a matrix as a row vector and vice.... Rows, you can not transpose these unless you are a human and gives temporary. General property of multilinear alternating maps ) check to access make a transpose in... Execute from 0 to the initial subscript 1-D array or known to be a collection of a columns... Array is known as rows and columns is called ____ matrix consider the matrix to a,. The determinant by −1 taking an example operations on 'matlab ' IP: 192.145.237.241 • Performance & security by,. Of matrix is also called an adjugate matrix of columns or rows of a 1-D array or known be. Determinant of a taking the transpose of matrix a and we get modified matrix B is called the... Vector and vice versa, indeed, but the row name is gone now n ) described. Either in row-major and column-major those with a single row are called column when! Called an adjugate matrix 8 and 10 ( it is called the pivot column the following example described how make. * n then = || of order m * n then = || of order m * then... Both ) is called a ____ 2 matrix I since the columns into rows is called orthogonal! Determinant by the sign of the original matrix appears in 2 rows and columns is, Stack Overflow 3 in... Collection of a taking the transpose, Stack Overflow interchanging rows and columns is is... As: the column in which eliminations are performed is called the transpose of.... Aat = I, before moving on to the solution one way to solve any problem and we its... And column-major element is considered itself a 1-D array = I matrix a and we get modified matrix.... ) printf (  Variables Swapped r tries to simplify the matrix to a vector, for... Matrix with an infinite number of rows or columns present in a matrix with an infinite number of or! Returned So, make a transpose matrix in TypeScript matrix as a nested list ( list inside a )! Loops or nested loops where outer loops execute from 0 to the web property taking an example,. C. int x=5, y=6 ; x=x+y ; y=x-y ; x=x-y ; if ( n! Please try your approach on first, before moving on to the solution by making the rows of a matrix... Single row are called row vectors, those with a single row is So! I do this in MATLAB, because Excel only has 256 column which not...


# Finding the mod of a difference of large powers

I am trying to find if $$4^{1536} - 9^{4824}$$

is divisible by 35. I tried to show that it is not by finding that neither power is divisible by 35 but that doesn't entirely help me. I just know that I can't use fermats little theorem to help solve it.

• It doesn't help, because both are clearly not divisible by 35. Just find if the two powers have the same residue mod 35 – Old John Feb 13 '15 at 23:40
• It's definitely divisible by $5$ as its last digit is $5$ (check last digits of $4^n$ and $9^n$. Perhaps this might be useful (so you need to check divisibility by $7$). – Andrei Rykhalski Feb 13 '15 at 23:41
• @AndreiRykhalski: $4^4-9^1=247$ is not divisible by $5$. – barak manos Feb 13 '15 at 23:45
• @barakmanos I didn't mean that $4^n$ - $9^m$ for all $n$ and $m$, but the fact that last digit of a power of a number is a periodic function. – Andrei Rykhalski Feb 13 '15 at 23:48

First, $$4^{1536}-9^{4824}\equiv(-1)^{1536}-(-1)^{4824}\equiv 1-1\equiv 0\pmod{5}.$$ Second, $$4^{1536}-9^{4824}=64^{512}-729^{1608}\equiv 1^{512}-1^{1608}\equiv 1-1\equiv 0\pmod{7}.$$

Edit: if you are unfamiliar with modular arithmetic, think in terms the Binomial Theorem. For example, (below, $A$ is some integer) $$4^{1536}=(5-1)^{1536}=5A+(-1)^{1536}=5A+1$$ where the last equality follows because $1536$ is even.

• How does 4 turn into -1? – user138246 Feb 13 '15 at 23:57
• $4\equiv-1\pmod{5}$ because $4-(-1)=5$ is divisible by $5$. – yurnero Feb 13 '15 at 23:58
• I don't follow that logic, can you demonstrate with a more simple example? – user138246 Feb 14 '15 at 0:16
• I don't know the binomial theorem either but how is it that you are taking the powers of 4 and 9 and turning them both into 1? – user138246 Feb 14 '15 at 0:28
• @user138246 $a\equiv b\pmod{p}\implies a^n\equiv b^n\pmod{p}, \forall n\in\mathbb N$, because $a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+a^{n-3}b^2+\cdots+ab^{n-2}+b^{n-1})$, so $4\equiv -1\pmod{5}\implies 4^{1536}\equiv (-1)^{1536}\equiv 1\pmod{5}$, because $(-1)^{1536}=1$. Same logic for everything else. – user26486 Feb 14 '15 at 0:38

Note $4^6\equiv (-6)^2 \equiv 1$ (mod $35$) and $6 \mid 1536$, so $4^{1536}\equiv 1$ (mod $35$).

Similarly $9^6 \equiv 1$ (mod $35$) $\implies 9^{4824}\equiv 1$ (mod $35$).

So we can conclude that $4^{1536}-9^{4824} \equiv 0$ (mod $35$), i.e. the number is divisible by $35$.

• I don't understand the $6 | 1536$ part, what does that mean? – user138246 Feb 14 '15 at 0:19
• @user138246 $6\mid 1536\implies 1536=6c$ for some $c\in\mathbb N$, so $4^{1536}\equiv 4^{6\cdot c}\equiv (4^6)^c\equiv 1^c\equiv 1\pmod{35}$. We had $(4^6)^c\equiv 1^c\pmod{p}$ because $4^6\equiv 1\pmod{p}$ and $a\equiv b\pmod{p}\implies a^n\equiv b^n\pmod{p},\forall n\in\mathbb N$, because $a^n-b^n=(a-b)(a^{n-1}+a^{n-2}b+\cdots+ab^{n-2}+b^{n-1})$. – user26486 Feb 14 '15 at 0:43

Hint mod $\,5\!:\ 4\equiv -1\equiv 9\,\Rightarrow\, \color{#c00}{4^6\equiv 1\equiv 9^6}$

and,  mod $\,7\!:\ 9^3\equiv 2^3\equiv 1\,\Rightarrow\ \color{#c00}{4^6\equiv 1\equiv 9^6}$

So mod $\,35\!:\ \color{#c00}{4^3\equiv 1\equiv 9^3}\$ by CRT  (or by $\,5,7\mid a^6\!-\!1\,\Rightarrow\,{\rm lcm}(5,7)=35\mid a^6\!-\!1)$

So mod $\,35\!:\ \color{#c00}4^{\color{#c00}3j} - \color{#c00}9^{\color{#c00}9^k}\equiv \color{#c00}1^{j}-\color{#c00}1^{k} \equiv 1$

In particular it's true if the exponents are even with digit sum divisible by $\,3,\,$ as in your case.

Remark $\$ Since you say congruence arithmetic is unfamiliar, below is a more elementary proof using only that $\,a-b\mid a^n-b^n.\$ Suppose $\ 2\mid j\!-\!i \ge 0.\$ Then

\qquad\quad \begin{align} 9^{3j}-4^{3i} = &\ 9^{3j}-4^{3j}\ +\ 4^{3j}-4^{3i}\\ = &\ \color{#0a0}{9^{3j}-4^{3j}}\ +\ 4^{3i}\,(\color{#c00}{4^{3(j-i)}\!-1})\end{align}

But $\ 5,7\mid 9^3-4^3\mid \color{#0a0}{9^{3j}-4^{3j}}$ and $\,5,7\mid 4^6-1\mid \color{#c00}{4^{3(j-i)}\!-1}\,$ by $\,2\mid j\!-\!i\,\Rightarrow\, 6\mid 3(j\!-\!i)$

Thus $\,5,7\,$ also divide their sum, therefore their lcm = $\,5\cdot 7 = 35\,$ divides their sum.

• Can you explain your notation, I am not familiar with it enough to read this commit. I don't know what the : implies, I don't know what CRT is, I don't know what lcm is either. Thanks. – user138246 Feb 14 '15 at 0:15
• @user138246 Do you know congruence arithmetic? i.e. $\,a\equiv b\pmod m\$ iff $\ m\mid a-b\ \$ – Gone Feb 14 '15 at 0:21
• I do not and I do not know what | means – user138246 Feb 14 '15 at 0:22
• @user138246 Usually these problems are posed after one learns a bit of elementary number theory. You should state in your question that you are not familiar with congruences or modular arithmetic. What textbook are you using? – Gone Feb 14 '15 at 0:29
• I know a little bit of modular arithmetic and the idea of congruence, I am just not familiar with the math heavy notation and acronyms. – user138246 Feb 14 '15 at 0:30

Fermat's little theorem:

"If $p$ is a prime number, then: $\forall$ $x \in \Bbb N / gcd(x,p) = 1$, $x^{p-1} \equiv 1 \pmod p$".

Let $N = 4^{1536} - 9^{4824}$.

$4^{1536} = (4^6)^{256} \equiv 1 \pmod 7$ (Fermat's little)

$9^{4824} = (9^6)^{804} \equiv 1 \pmod 7$ (Again, Fermat)

Thus: $N \equiv 1 - 1 \pmod 7 \equiv 0 \pmod 7$. This shows that $7 | N$.

Now:

$4^{1536} = (4^4)^{384} \equiv 1 \pmod 5$ (Fermat..)

$9^{4824} = (9^4)^{1206} \equiv 1 \pmod 5$ (Again)

Thus: $N \equiv 1 - 1 \pmod 5 \equiv 0 \pmod 5$.

This shows $5|N$.

Therefore $5|N$ and $7|N$. This gives $35|N$.

• Why is $4^{6*256} = 1 (mod 7)$ I don't follow. 1 mod 7 is just 1 but how did you conclude that 4 raised to some massive power is equal to 1? It makes no sense to me. – user138246 Feb 13 '15 at 23:59
• $4^6 \equiv 1 \pmod 7$ using the aforementioned theorem. Now raise both sides to that "massive power". $1$ will still be $1$. – user207710 Feb 14 '15 at 0:01
• Yes I see that but you are making the claim that some number (that is not 1) is equal to 1. I do not see how that stands. – user138246 Feb 14 '15 at 0:04
• "$a \equiv b \pmod n$" means that the remainder of division of $a$ by $n$ is $b$. It doesn't mean that $a = b$. – user207710 Feb 14 '15 at 0:08
• Was the "I can't use Fermat" bit present from the beginning? I completely missed that. – user207710 Feb 14 '15 at 0:11

I have little background in this area, but I can determine the answer, ergo anyone else with little background should have no trouble following along.

I know that $x^n$ mod $p$ will follow a cyclic pattern as n is iterated, so I'll first find what those cycles are for $4^n$ mod $35$ and $9^n$ mod $35$, for $n = 0,1,2,3...$

$4^n$ mod $35 = 1,4,16,29,11,9,1,4,16,29...$

$9^n$ mod $35 = 1,9,11,29,16,4,1,9,11,29...$

So we see that both cycles have a length of 6, so you can know what each number's $nth$ power mod $35$ is by what the exponent $n$ mod $6$ is. $4^a - 9^b$ will be divisible by $35$ if $4^a$ and $9^b$ have the same value mod $35$. Importantly, the two cycles above are in fact the reverse of each other. So $4^a$ will have the same value mod $35$ as $9^b$ if $a$ mod $6 = (6 - (b$ mod $6))$ mod $6$. As it happens, both $1536$ mod $6$ and $4824$ mod $6$ equal $0$, so they do satisfy the aforementioned equation, and therefore $4^{1536} - 9^{4824}$ IS divisible by $35$.

I will suggest to use Euler's Theorem which states $\forall a \in \mathbb{Z}$ s.t. gcd$(a, n)=1$, then $a^{\phi(n)} \equiv 1$ mod $n$

In your case we have $n=35$, $\quad a=4,9\quad$ and $\quad \phi(35)=24$

So $\quad \quad 4^{24} \equiv 1$ mod $35\quad$ and $\quad 9^{24} \equiv 1$ mod $35\quad$

Since $\quad4$x$64 = 1536 \quad$ and $\quad 9$x$201 = 4824$

So $\quad \quad 4^{1536} \equiv 1$ mod $35\quad$ and $\quad 9^{4824} \equiv 1$ mod $35\quad$

Hence $\quad 4^{1536} - 9^{4824} \equiv 1 - 1 \equiv 0$ mod $35\quad \implies 35 | 4^{1536} - 9^{4824}$


# Anamorphic Reflections in a Christmas Ball

Posted 7 months ago
3483 Views
|
10 Replies
|
48 Total Likes
|
 Open in Cloud | Download to Desktop via Attachments BelowI recently got inspired by a sculpture sold on Saatchi Art featuring anamorphic deformation by reflection in a spherical mirror. Being curious and interested in anamorphic transformations, I wanted to build something similar and find the math behind it using Mathematica...A plain, undecorated Christmas ball can serve as a perfect convex spherical mirror to test some of our physics and coding skills. I used a 7 cm XMas ball now dumped in stores for Euro1.75 a sixpack! In a nutshell: I wanted to see how a deformed text should look like in order to show up undeformed when reflected in a ball shaped mirror. The graphics below show a spherical mirror centered at C:(0,0,0), our eye at viewpoint V: (xv,0,zv) and a reflected point S on the base plane beneath the ball. One of the reflected light rays leaving S will meet the mirror at Q such that its reflection meets the eye at V. But the eye at V will now perceive the point S at I. I is a perceived image point inside the view disk perpendicular to VC. According to the law of reflection, the lines VQI and SRQ will form equal angles with the normal n to the sphere in Q. All image points will be restricted to a disk that is the base of the view cone with the line CV as axis and an opening angle of tan^-1(zv/xv). This image disk is at an offset 1/xv from C and has a radius of Sqrt[1-(1/xv)^2]. The point Q (q1, q2, q3) is the intersection of the view line VI and the mirror sphere. It can be computed by solving this equation: solQ = NSolve[ Element[{x, y, z}, HalfLine[{imagePointI, viewPointV}]] && Element[{x, y, z}, Sphere[]], {x, y, z}]; pointQ = First[{x, y, z} /. solQ]; {q1, q2, q3} = pointQ; The points C, Q, I, V and S are all in the same plane. We have R, the projection of V to the normal n. projectionPlane = InfinitePlane[pointQ, {pointQ, viewPointV}]; reflectionPt = 2 Projection[viewPointV, pointQ] - viewPointV; The point S is now the intersection of of the line QR with the base plane. It can be computed by solving this equation: solS = NSolve[{{x, y, z} \[Element] HalfLine[{{q1, q2, q3}, reflectionPt}] && {x, y, z} \[Element] InfinitePlane[{{0, 0, -1}, {0, 1, -1}, {0, -1, -1}}]}, {x, y, z}]; After simplification, we can write the following function that maps the perceived image point I to the reflected point R : xmasBallMap[iPt : {yi_, zi_}, vPt : {xv_, zv_}] := Module[{imagePtRotated, solQ, q1, q2, q3}, (*image point in real (rotated) pane*) imagePtRotated = {(1 - zi zv)/Norm@vPt, yi, (xv^2 zi + zv)/xv/Norm@vPt}; (*intersection viewline-sphere: Q*) solQ = NSolve[ Element[{x, y, z}, HalfLine[{imagePtRotated, {xv, 0, zv}}]] && Element[{x, y, z}, Sphere[]], {x, y, z}]; {q1, q2, q3} = First[{x, y, z} /. solQ]; Join[{-(1 + q3) (q2^2 + q3^2) xv + q1^2 (xv - q3 xv) + q1^3 (-1 + zv) + q1 q2^2 (-1 + zv) + q1 q3 (q3 (-1 + zv) + 2 zv), q2 (2 q1 xv + q1^2 (-1 + zv) + q2^2 (-1 + zv) + q3 (q3 (-1 + zv) + 2 zv))}/(-2 q1 q3 xv + q3^2 (q3 - zv) + q1^2 (q3 + zv) + q2^2 (q3 + zv)), {-1}]] All possible image points have to fit inside the lower half-disk. This is a grid of image points inside the view disk: pts = Table[ Table[{x, y}, {x, -Floor[Sqrt[1 - y^2], .1] + .1, Floor[Sqrt[1 - y^2], .1] - .1, .025}], {y, 0, -.9, -.025}]; viewDisk = Graphics[{Circle[{0, 0}, 1, {\[Pi], 2. \[Pi]}], {AbsolutePointSize[2], Point /@ pts}}, Axes -> True, AxesOrigin -> {-1, -1}, AxesStyle -> Directive[Thin, Red]] This is the reflected spherical anamorphic map of these points:We can see that there is a large magnification between the perceived image inside the ball and it reflected image. Getting a point too close to the rim of the view disk will project its reflection far away. This GIF shows the function in action. The image point I follows a circle in the perceived image disk while its reflection S follows the closed curve of its map xmasBallmap(I, v) in the base plane. We can now further test our function with some text e.g.: "[MathematicaIcon]Mathematica[MathematicaIcon]". ma = First[First[ ImportString[ ExportString[ Style["\[MathematicaIcon]Mathematica\[MathematicaIcon]", FontFamily -> "Times", FontSize -> 72], "PDF"], "TextMode" -> "Outlines"]]] /. FilledCurve :> JoinedCurve; The text image needs to be rescaled and centered to fit inside the ball. maCenteredScaled = ma /. {x_?NumericQ, y_?NumericQ} :> {x, y}*.005 /. {x_?NumericQ, y_?NumericQ} :> {x - .93, y - .45}; This shows the text as should be perceived in the lower half of the mirror sphere:This is the code for a 3D view of the complete setup: the spherical mirror, the perceived text in the disk inside the sphere and the deformed, anamorphic image on the base plane. Quiet@Module[{xv = 10., zv = 3., \[Phi], rotationTF, pointA, viewPt, mathPts, rotatedMathPts, reflectedPts}, (*view angle*)\[Phi] = ArcTan[xv, zv]; rotationTF = RotationTransform[-\[Phi], {0, 1, 0}, {0, 0, 0}]; (*view pane rotation anchor*) pointA = {(0 - .01) Cos[\[Phi]], 0, (0 - .01) Sin[\[Phi]]}; (*point coordinates in y-z plane*) mathPts = maCenteredScaled[[-1, 1, All, -1]]; rotatedMathPts = Map[rotationTF, mathPts /. {y_?NumericQ, z_?NumericQ} :> {0, y, z}, {3}]; reflectedPts = Map[xmasBallMap[#, {xv, zv}] &, mathPts, {3}]; Graphics3D[{ (*reflected image plane (floor)*){Opacity[.45], LightBlue, InfinitePlane[{{0, 0, -1}, {1, 0, -1}, {-1, .5, -1}}]}, (*mirror sphere*){Opacity[.35], Sphere[]}, (*center of sphere*){Black, Sphere[{0, 0, 0}, .03]}, (*percieved image pane*){Opacity[.35], Cylinder[{{0, 0, 0}, pointA}, 1]}, (*perceived image*){Red, Line /@ rotatedMathPts}, (*reflected image*){Red, AbsoluteThickness[3], Line /@ reflectedPts}}, Boxed -> False]] Time to try the real thing. This shows a 7cm diameter XMas ball mirror with the text reflected in it. Get yourself a nice reflecting Christmas ball and this is a pdf for you to printout and try it! (see attached pdf file for printing) Attachments:
10 Replies
Sort By:
Posted 7 months ago
 Really cool! Thanks for sharing!
Posted 7 months ago
 - Congratulations! This post is now a Staff Pick as distinguished by a badge on your profile! Thank you, keep it coming, and consider contributing your work to the The Notebook Archive!
Posted 7 months ago
 Great post after Cylinder Mirror，Echer-Style in reverse ！
Posted 7 months ago
 This is really impressive!
Posted 7 months ago
 @Erik, this is absolutely wonderful holidays idea. I was thinking one can really hide a secret message for loved ones hardly readable on paper but "magically" revealed by a Christmas Ball. What a fun computational project!
Posted 7 months ago
 For those interested, here is a complete notebook to give it a try with your own Xmas wishes! I could not compile so, it is rather slow, be patient... Attachments:
Posted 7 months ago
 Forgot to add the end result!
Posted 7 months ago
 Very nice.My first thought was wall art, then I wondered about how high the art would need to be to see the reflection in the reflecting ball that would need to be attached, so table art it is!It might be fun to try something with the Chicago Cloud Gate (the bean), but the dimensions: Dimensions 10 m × 13 m × 20 m (33 ft × 42 ft × 66 ft) might not make it very feasible to print out something to place at the base of the end of the sculpture.
Posted 7 months ago
 Wow, Dorothy, Chicago Cloud Gate is an interesting idea ! We'd need to know the geometry of the bean, but just imagining a giant cryptic scribble on the ground spelling out letters in its reflection got me really thinking... I wonder how one would approach this. Drone might be useful for both: general capture to represent best in online media and also for proper reflective angle positioning, possibly, if human eye level will not properly capture the sensibly sized letters. A street artist who makes ground drawing illusions could possibly be involved. Note people can go also UNDER cloud gate, which gives fantastic reflection geometry.
Posted 7 months ago
 The idea of the Chicago bean is wonderful but we have to consider some specifics of a sphere mirror. Only one half of the sphere will reflect the anamorphic image. Either the lower half from an image on the floor below the sphere or the upper half from an image on the ceiling above the sphere.1.If the anamorphic image is on the floor, the perceived image must be in the lower half of the sphere This could be achieved with a hanging mirror ball. The viewpoint of the observer is at V just above the floor.2.The anamorphic is on the ceiling and then we perceive it in the upper half of the sphere This could be done by painting the anamorphic image on a ceiling above the ball The viewpoint of the observer is at V just above the floor but higher than the sphere center.. In the case of the "bean", we have here an upper half of a convex (ball like) mirror and the anamorphic image would need to be on some type of suspended ceiling above the bean mirror surface. Not on the floor.
Community posts can be styled and formatted using the Markdown syntax.


# Finding the centralizer of a permutation

I need to find the centralizer of the permutation $\sigma=(1 2 3 ... n)\in S_n$.
I know that:
$C_{S_n}(\sigma)=\left\{\tau \in S_n|\text{ } \tau\sigma\tau^{-1}=\sigma\right\}$
In other words, that the centralizer is the set of all the elements that commute with $\sigma$, and I also know that if two permutations have disjoint cycles it implies that they commute, but the thing is; there are no $\tau\in S_n$ s.t. $\tau$ and $\sigma$ have disjoint cycles, since $\sigma=(1 2 3...n)$.
So can I conclude that $\sigma$ does not commute with any other $\tau$ in $S_n$ (besides $id$ of course)?
I guess my question reduces to: is the second direction of the implication mentioned above also true? meaning, if two permutation commute, does it imply that they have disjoint cycles?
If the answer is no, how else can I find the $C_{S_n}(\sigma)$?

By the way, on related subject, I noticed that if an element $g$ of a group $G$ is alone it its conjugacy class, it commutes with all elements in $G$.
What does it mean, intuitively, for an element to share its conjugacy class with another element? does it mean it "almost" commute with everyone in the group?
Is it true that the bigger the conjugacy class, the lesser its members commutes with others in the group?

• No, the other direction does not hold. A permutation will always commute with all powers of itself. – Tobias Kildetoft Jun 19 '14 at 20:23
• For your last paragraph: “The size of a conjugacy class is equal to the index of its centralizer.” is the way your truth is often expressed. – Jack Schmidt Jun 19 '14 at 20:24
• The part in quotation marks in @JackSchmidt's comment also gives you a good way to see how many elements should be in this centralizer, assuming you are familiar with how conjugacy classes look in the symmetric groups. – Tobias Kildetoft Jun 19 '14 at 20:25
• @TobiasKildetoft, I know that "two permutations conjugate iff they have the same cycle type". Is that what you meant? – so.very.tired Jun 19 '14 at 20:34
• Yes, precisely. – Tobias Kildetoft Jun 19 '14 at 20:40

Hint: conjugacy in $S_n$ leaves cycle types in tact: $\tau^{-1}(1 2 3 \dots n)\tau=(\tau(1) \tau(2)\tau(3) \cdots \tau(n))$.

• It will only help me figure out how many are there ($(n-1)!$), but will I be able to find them? I'm just confused about how I'm supposed to explicitly write them (the above is a question that might appear in my exam next week). – so.very.tired Jun 19 '14 at 20:40
• Well if $\sigma$ is centralized by $\tau$, so $\tau^{-1}(1 2 3 \dots n)\tau=(\tau(1) \tau(2)\tau(3) \cdots \tau(n))=(1 2 3 \cdots n)$, can you see that $\tau$ must be a power of $\sigma$ (try small examples $n=2,3$)? Your observation of $(n-1)!$ is not correct ... – Nicky Hekster Jun 19 '14 at 20:49
• Yeah, you're right, my $(n-1)!$ observation was mistakenly referred to the size of the centralizer, instead of to the size of the conjugacy class. – so.very.tired Jun 19 '14 at 21:06
• OK, proving that $\sigma$ commutes with all powers of itself was easy, and thus giving $<\sigma>\subset C_{S_n}(\sigma)$, but I couldn't figure out from the hint why does it mean that any other element which isn't a power of $\sigma$ does not belong to the centralizer, meaning that $<\sigma>= C_{S_n}(\sigma)$ – so.very.tired Jun 19 '14 at 21:18
• Ah great! That's your "learning point", glad you see it now! – Nicky Hekster Jun 19 '14 at 21:43

Let $S_n$ act on itself by conjugation. Let $g = (1,2,\ldots,n)$. The size of the orbit of $g$ in this action is its conjugacy class $\{ h^{-1} gh: h \in S_n\}$. The stabilizer subgroup of $g$ in this action is the set of elements $h$ in $S_n$ such that $h^{-1}gh=g$, i.e. the centralizer $C_{S_n}(g)$. By the orbit-stabilizer lemma, the size of the orbit equals the index of the stabilizer. The size of the orbit is the number of elements that have the same cycle structure as $g$, which is $(n-1)!$. Thus, the index of the centralizer is $(n-1)!$, whence the centralizer has $n! / (n-1)!=n$ elements. Thus the powers of $g$ exhaust all of $C_{S_n}(g)$.

A second proof is as follows. For the special case where $g=(1,2,\ldots,n)$, we can determine its centralizer in $S_n$ without using the orbit-stabilizer lemma. If $h^{-1}gh = g$, then $(h(1),h(2),\ldots,h(n)) = (1,2,\ldots,n)$. Now, $h(1)$ can be chosen in $n$ ways to be any of $1,2,\ldots,n$, but once $h(n)$ is chosen, the remaining elements $h(2),\ldots,h(n)$ are uniquely determined. In fact, if $h(1)=i$, then $h(2)=i+1$, and so on, and so $h$ is just a power of $g$. Thus, there are exactly $n$ different elements $h$ such that $h^{-1}gh=g$.

Note that $$|\sigma| = n$$ so that $$\sigma^n = 1$$. So $$\langle \sigma \rangle = \{1, \sigma, \sigma^2, \ldots, \sigma^{n-1}\}$$ forms a cyclic commutative subgroup of $$S_n$$ with order $$|\langle \sigma \rangle| = n$$. For any permutation $$x$$ of a symmetric group $$S_n$$ we have the very convenient formula: $$|C(x)| = 1^{\alpha_1}2^{\alpha_2}\cdots n^{\alpha_n}\alpha_1!\alpha_2!\ldots\alpha_n!,$$ where $$\alpha_i$$ is the number of cycles in $$x$$ of length $$i$$. For your permutation $$\alpha_1 = \alpha_2 = \cdots \alpha_{n-1} = 0$$ and $$\alpha_n = n$$ so $$|C(\sigma)| = n$$. We have $$|C(\sigma)| = |\langle \sigma \rangle| = n$$, implying $$C(\sigma) = \langle \sigma \rangle$$.


# Why does the series $\sum\limits_{n=2}^\infty\frac{\cos(n\pi/3)}{n}$ converge?

Why does this series $$\sum\limits_{n=2}^\infty\frac{\cos(n\pi/3)}{n}$$ converge? Can't you use a limit comparison with $1/n$?

• Can you please edit the title so it is clear what you are asking? Is it $\sum_{n=1}^{\infty} \cos \dfrac{n\pi}{3n}$ – Aryabhata Apr 5 '13 at 6:04
• Careful, your first statement is not correct. The cosine term will oscillate as $n$ gets large and never approach a single value. – Jared Apr 5 '13 at 6:04
• @Jared you are right, will correct it. Is it an alternating series? – Billy Thompson Apr 5 '13 at 6:07
• Yes, this sounds like the way to go. It's not a strictly alternating series, but the sign change in cosine is what causes convergence. You may even be able to evaluate this explicitly using telescoping series, because we know the values of $\cos(\frac{n\pi}{3})$ for all integral $n$. – Jared Apr 5 '13 at 6:08
• @Jared is there any other way to evaluate it? – Billy Thompson Apr 5 '13 at 6:10

First of all your conclusion is wrong since $\lim_{n \to \infty} \cos(n \pi/3)$ doesn't exist.

The convergence of $$\sum_{n=1}^N \dfrac{\cos(n\pi/3)}{n}$$ can be concluded based on Abel partial summation (The result is termed as generalized alternating test or Dirichlet test). We will prove the generalized statement first.

Consider the sum $S_N = \displaystyle \sum_{n=1}^N a(n)b(n)$. Let $A(n) = \displaystyle \sum_{n=1}^N a(n)$. If $b(n) \downarrow 0$ and $A(n)$ is bounded, then the series $\displaystyle \sum_{n=1}^{\infty} a(n)b(n)$ converges.

First note that from Abel summation, we have that \begin{align*}\sum_{n=1}^N a(n) b(n) &= \sum_{n=1}^N b(n)(A(n)-A(n-1))\\&= \sum_{n=1}^{N} b(n) A(n) - \sum_{n=1}^N b(n)A(n-1)\\ &= \sum_{n=1}^{N} b(n) A(n) - \sum_{n=0}^{N-1} b(n+1)A(n) \\&= b(N) A(N) - b(1)A(0) + \sum_{n=1}^{N-1} A(n) (b(n)-b(n+1))\end{align*} Now if $A(n)$ is bounded i.e. $\vert A(n) \vert \leq M$ and $b(n)$ is decreasing, then we have that $$\sum_{n=1}^{N-1} \left \vert A(n) \right \vert (b(n)-b(n+1)) \leq \sum_{n=1}^{N-1} M (b(n)-b(n+1))\\ = M (b(1) - b(N)) \leq Mb(1)$$ Hence, we have that $\displaystyle \sum_{n=1}^{N-1} \left \vert A(n) \right \vert (b(n)-b(n+1))$ converges and hence $$\displaystyle \sum_{n=1}^{N-1} A(n) (b(n)-b(n+1))$$ converges absolutely. Now since $$\sum_{n=1}^N a(n) b(n) = b(N) A(N) + \sum_{n=1}^{N-1} A(n) (b(n)-b(n+1))$$ we have that $\displaystyle \sum_{n=1}^N a(n)b(n)$ converges.

In your case, $a(n) = \cos(n \pi/3)$. Hence, $$A(N) = \displaystyle \sum_{n=1}^N a(n) = - \dfrac12 - \cos\left(\dfrac{\pi}3(N+2)\right)$$which is clearly bounded.

Also, $b(n) = \dfrac1{n}$ is a monotone decreasing sequence converging to $0$.

Hence, we have that $$\sum_{n=1}^N \dfrac{\cos(n\pi/3)}{n}$$ converges.

Look at some of my earlier answers for similar questions.

For what real numbers $a$ does the series $\sum \frac{\sin(ka)}{\log(k)}$ converge or diverge?

Give a demonstration that $\sum\limits_{n=1}^\infty\frac{\sin(n)}{n}$ converges.

If the partial sums of a $a_n$ are bounded, then $\sum{}_{n=1}^\infty a_n e^{-nt}$ converges for all $t > 0$

If you are interested in evaluating the series, here is a way out. We have for $\vert z \vert \leq 1$ and $z \neq 1$, $$\sum_{n=1}^{\infty} \dfrac{z^n}n = - \log(1-z)$$ Setting $z = e^{i \pi/3}$, we get that $$\sum_{n=1}^{\infty} \dfrac{e^{in \pi/3}}n = - \log(1-e^{i \pi/3})$$ Hence, \begin{align} \sum_{n=1}^{\infty} \dfrac{\cos(n \pi/3)}n & = \text{Real part of}\left(\sum_{n=1}^{\infty} \dfrac{e^{in \pi/3}}n \right)\\ & = \text{Real part of} \left(- \log(1-e^{i \pi/3}) \right)\\ & = - \log(\vert 1-e^{i \pi/3} \vert) = 0 \end{align} Hence, $$\sum_{n=2}^{\infty} \dfrac{\cos(n \pi/3)}n = - \dfrac{\cos(\pi/3)}1 = - \dfrac12$$

• I think it is time to write a general answer for generalized alternating test and close tons of similar questions as abstract duplicates. – user17762 Apr 5 '13 at 6:13
• I support the motion. – Did Apr 5 '13 at 7:10
• I'm a little confused about something. On the one hand, you show that $\sum a_n b_n$ should converge absolutely. But $\sum \cos (n \pi 3) n^{-1}$ does not converge absolutely, as the nth term is at least $\frac{1}{2n}$ in absolute value. So I feel I must be missing something? – davidlowryduda Apr 5 '13 at 8:14
• @mixedmath Yes, you are absolutely right. $\sum a_n b_n$ doesn't converge absolutely. I have changed it. The proof remains un affected. What we have is $\sum A(n)(b(n) - b(n+1))$ converges absolutely and this is what we want. This doesn't mean that $\sum a(n)b(n)$ converges absolutely. Thanks for pointing this out. – user17762 Apr 5 '13 at 15:16
• Awesome. Thanks, and great writeup! – davidlowryduda Apr 5 '13 at 16:03

Note that $$\cos(n\pi/3) = 1/2, \ -1/2, \ -1, \ -1/2, \ 1/2, \ 1, \ 1/2, \ -1/2, \ -1, \ \cdots$$ so your series is just 3 alternating (and convergent) series inter-weaved. Exercise: Prove that if $\sum a_n, \sum b_n$ are both convergent, then the sequence $$a_1, a_1+b_1, a_1+b_1+a_2, a_1+b_1+a_2+b_2, \cdots$$ is convergent. Applying that twice proves your series converges.


# How can I argue that for a number to be divisible by 144 it has to be divisible by 36?

Suppose some number $$n \in \mathbb{N}$$ is divisible by $$144$$.

$$\implies \frac{n}{144}=k, \space \space \space k \in \mathbb{Z} \\ \iff \frac{n}{36\cdot4}=k \iff \frac{n}{36}=4k$$

Since any whole number times a whole number is still a whole number, it follows that $$n$$ must also be divisible by $$36$$. However, what I think I have just shown is:

$$\text{A number }n \space \text{is divisble by} \space 144 \implies n \space \text{is divisible by} \space 36 \space (1)$$

Is that the same as saying: $$\text{For a number to be divisible by 144 it has to be divisible by 36} \space (2)$$

In other words, are statements (1) and (2) equivalent?

• Yes, absolutely. – Bernard Nov 11 '18 at 20:47
• Pedantically, the first sentence could have a different meaning if it somehow isn't obvious from context that $n$ is universally quantified. But in general they're the same. – Ian Nov 11 '18 at 20:49
• You mean this sentence "Since any whole number times a whole number is still a whole number, it follows that n must also be divisible by 36. ",right? – Nullspace Nov 11 '18 at 20:52
• In general, if $a$ is divisible by $b$, and $b$ is divisible by $c$, then $a$ is divisible by $c$. – AlexanderJ93 Nov 12 '18 at 0:14

Yes, it's the same. $$A\implies B$$ is equivalent to "if we have $$A$$, we must have $$B$$".

And your proof looks fine. Good job.

If I were to offer some constructive criticism, it would be of the general kind: In number theory, even though we call the property "divisible", we usually avoid division whenever possible. Of the four basic arithmetic operations it is the only one which makes integers into non-integers. And number theory is all about integers.

Therefore, "$$n$$ is divisible by $$144$$", or "$$144$$ divides $$n$$" as it's also called, is defined a bit backwards:

There is an integer $$k$$ such that $$n=144k$$

(This is defined for any number in place of $$144$$, except $$0$$.)

Using that definition, your proof becomes something like this:

If $$n$$ is divisible by $$144$$, then there is an integer $$k$$ such that $$n=144k$$. This gives $$n=144k=(36\cdot4)k=36(4k)$$ Since $$4k$$ is an integer, this means $$n$$ is also divisible by $$36$$.

• Programmers might may say mod() = 0 rather than "divides", if n modulus 144 is zero then n modulus 36 is zero etc. Non zero values are integers. – mckenzm Nov 12 '18 at 0:30
• Every definition I ever see of divisibility specifically excludes $0$ as a potential divisor (checked a few abstract algebra books here, etc.). If that were not the case, it would wind up violating the Division Algorithm, leave greatest common divisors not well-defined, etc. – Daniel R. Collins Nov 13 '18 at 5:15

Yes that's correct or simply note that

$$n=144\cdot k= 36\cdot (4\cdot k)$$

but $$n=36$$ is not divisible by $$144$$.

The $$\implies$$ symbol is defined as follows:

If $$p \implies q$$ then if $$p$$ is true, then $$q$$ must also be true. So when you say $$144 \mid n \implies 36 \mid n$$ it's the same thing as saying that if $$144 \mid n$$, then it must also be true that $$36 \mid n$$.

There are often multiple approaches to proofs. Is usually good to be familiar with multiple techniques.

You have a very good approach. Parsimonious and references only the particular entities at hand.

Some times, for the sake of illustrating the use of additional concepts, you might want to deviate from parsimony.

In that spirit, here's an additional proof.

According to The Fundamental Theorem of Arithmetic, if something is divisible by 144, then it is divisible by at least the same primes raised to the powers you need to yield 144. In other words, $$144=2^43^2$$. For something to be divisible by 144, the primes 2 and 3 must appear in its prime factorization. The powers of 2 and 3 must be at least 4 and 2, respectively. Now $$36=2^23^2$$. So any number who's prime factorization incluedes the primes 2 and 3, and has them raised at least to the power of 2, then it is also divisible by 36. If something is divisible by 144, we are guaranteed that 2 and 3 appear in its prime factorization. We area also guaranteed that the exponents on 2 and 3 are 4 and 2 respectively. So divisibility by 144 implies divisibility by 36 since the exponents satisfy the established criteria.

The prime factorization of 144 is 2 * 2 * 2 * 2 * 3 * 3. The prime factorization of 36 is 2 * 2 * 3 * 3.

If X is divisible by Y, then X's prime factorization contains all of the factors in Y's prime factorization.

Since 144's prime factorization contains all of the factors in 36's prime factorization, 144 is divisible by 36.

The prime factorization of any number that is divisible by 144 contains all of the prime factors of 144, which contains all of the prime factors of 36. Hence any number that is divisible by 144 has a prime factorization that contains all the prime factors of 36, and therefore is divisible by 36.

If $$n$$ is a multiple of $$144$$, it must automatically be a multiple of any divisor $$d$$ of $$144$$. The prime factorization of $$144$$ is $$(2^4)(3^2)$$, and so $$36 = (2^2)(3^2)$$ must be a divisor of $$144$$ and hence of $$n$$.


# Confused with a series problem

1. Oct 20, 2004

Problem

Let $$\sum a_n$$ be a series with positive terms and let $$r_n = \frac{a_{n+1}}{a_n}$$. Suppose that $$\lim _{n \to \infty} r_n = L < 1$$, so $$\Sum a_n$$ converges by the Ratio Test. As usual, we let $$R_n$$ be the remainder after $$n$$ terms, that is,

$$R_n = a_{n+1} + a_{n+2} + a_{n+3} + \cdots$$

(a) If $$\left\{ r_n \right\}$$ is a decreasing sequence and $$r_{n+1} < 1$$, show by summing a geometric series, that

$$R_n \leq \frac{a_{n+1}}{1-r_{n+1}}$$

(b) If $$\left\{ r_n \right\}$$ is an increasing sequence, show that

$$R_n \leq \frac{a_{n+1}}{1-L}$$

My Solution

(a) The first term $$r_{n+1}$$ prevails, since it represents an upper bound to other terms of $$\left\{ r_n \right\}$$ . Then,

$$R_n \leq a_{n+1} + a_{n+1}r_{n+1} + a_{n+1}\left( r_{n+1} \right) ^2 + a_{n+1}\left( r_{n+1} \right) ^3 + \cdots = \sum _{n=1} ^{\infty} a_{n+1}\left( r_{n+1} \right) ^{n-1} = \frac{a_{n+1}}{1-r_{n+1}}$$

(b) The last term $$L$$ prevails, since it represents an upper bound to other terms of $$\left\{ r_n \right\}$$ . Then,

$$R_n \leq a_{n+1} + a_{n+1}L + a_{n+1}L ^2 + a_{n+1} L ^3 + \cdots = \sum _{n=1} ^{\infty} a_{n+1}L ^{n-1} = \frac{a_{n+1}}{1-L}$$

Questions

1. Did I get it right?
2. Why use "$$\leq$$" instead of "$$<$$", since all terms of $$\left\{ r_n \right\}$$ are smaller then their respective upper bounds?
3. Isn't an increasing $$\left\{ r_n \right\}$$ rather contra-intuitive when we consider a convergent series $$\sum a_n$$, which obeys: $$\lim _{n \to \infty} a_n =0$$?

That's it. Thank you very much!!

2. Oct 20, 2004

### NateTG

Well, it really should be:
$$\lim_{n\rightarrow \infty} | r_n | < 1$$
otherwise, it would be possible to sneak in things like $$\sum 2^{-2n}$$ where $$r_n=-2<1$$.

If you can assume that $$|r_n|$$ is decreasing and $$|r_{n+1}|<1$$
You need to use absolute values to make the inequalities work:
$$|\sum_{i=n+1}^\infty a_i| \leq \sum_{i=n+1}^\infty |a_i| \leq \sum_{i=n+1}^\infty |a_n r_{n+1}^{i-n-1}|=\sum_{i=1}^\infty |a_n| |r_{n+1}|^i$$
You have the right idea, but what you have is not true if $$r_{n+1}$$ is positive and $$a_n$$ is negative.

Regarding the use of $$\leq$$ rather than $$<$$:
Constant sequences are often included in the notion of decreasing or increasing sequence, so there may be equality rather than strict inequality.

Regarding the existance of increasing $${r_n}$$
Consider, for example the possibility that $$r_n=\frac{1}{2}-\frac{1}{2^{n+1}}$$. It's pretty easy to see that the limit $$\lim_{n\rightarrow \infty} r_n = \frac{1}{2}$$ and that $$\{r_n\}$$ is increasing. However, since all of the $$r_n$$ are positive and less than $$\frac{1}{2}$$ we have:
$$0< r_n < \frac{1}{2}$$
Now
$$a_n=a_{n-1}\times r_{n-1}$$
so
$$\sum_{i=0}^{\infty} a_n = \sum_{i=0}^{\infty} (a_0 \times \prod_{j=0}^{i} r_j) < \sum_{i=0}^{\infty} (a_0 \times \prod_{j=0}^{i}\frac{1}{2}) = a_0 \times \sum_{i=0}^{\infty} \frac{1}{2^n} = 2a_0$$
which means that although $$\{r_n\}$$ is increasing the sum is convergent.

Last edited: Oct 20, 2004


apply simplification rules to an expression - Maple Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : Simplifying : simplify : simplify/details

simplify - apply simplification rules to an expression

 Calling Sequence simplify(expr, n1, n2, ...) simplify(expr, side1, side2, ...) simplify(expr, assume=prop) simplify(expr, symbolic)

Parameters

 expr - any expression n1, n2, ... - (optional) names; simplification procedures side1, side2, ... - (optional) sets or lists; side relations prop - (optional) any property

Basic Information

 • This help page contains complete information about the simplify command. For basic information on the simplify command, see the simplify help page.

Description

 • The simplify command is used to apply simplification rules to an expression.
 • The simplify/expr calling sequence searches the expression, expr, for function calls, square roots, radicals, and powers. It then invokes the appropriate simplification procedures.

Examples

Simple Example

 > $\mathrm{simplify}\left({4}^{\frac{1}{2}}+3\right)$
 ${5}$ (1)

Simplifying Trigonometric Expressions

 > $e:={\mathrm{cos}\left(x\right)}^{5}+{\mathrm{sin}\left(x\right)}^{4}+2{\mathrm{cos}\left(x\right)}^{2}-2{\mathrm{sin}\left(x\right)}^{2}-\mathrm{cos}\left(2x\right):$
 > $\mathrm{simplify}\left(e\right)$
 ${{\mathrm{cos}}{}\left({x}\right)}^{{4}}{}\left({\mathrm{cos}}{}\left({x}\right){+}{1}\right)$ (2)

Simplifying Exponentials and Logarithms

 > $\mathrm{simplify}\left({ⅇ}^{a+\mathrm{ln}\left(b{ⅇ}^{c}\right)}\right)$
 ${b}{}{{ⅇ}}^{{a}{+}{c}}$ (3)

Controlling Simplification Rules

 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2}\right)$
 ${1}{+}{\mathrm{ln}}{}\left({2}\right){+}{\mathrm{ln}}{}\left({x}\right)$ (4)
 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2},\mathrm{trig}\right)$
 ${1}{+}{\mathrm{ln}}{}\left({2}{}{x}\right)$ (5)
 > $\mathrm{simplify}\left({\mathrm{sin}\left(x\right)}^{2}+\mathrm{ln}\left(2x\right)+{\mathrm{cos}\left(x\right)}^{2},\mathrm{ln}\right)$
 ${{\mathrm{sin}}{}\left({x}\right)}^{{2}}{+}{\mathrm{ln}}{}\left({2}\right){+}{\mathrm{ln}}{}\left({x}\right){+}{{\mathrm{cos}}{}\left({x}\right)}^{{2}}$ (6)

Simplifying With Respect to Side Relations

 > $f:=-\frac{1{x}^{5}y}{3}+{x}^{4}{y}^{2}+\frac{1x{y}^{3}}{3}+1:$
 > $\mathrm{simplify}\left(f,\left\{{x}^{3}=xy,{y}^{2}=x+1\right\}\right)$
 ${{x}}^{{4}}{+}{{x}}^{{2}}{+}{x}{+}{1}$ (7)

Using the assume option

 > $g:=\sqrt{{x}^{2}}$
 ${g}{:=}\sqrt{{{x}}^{{2}}}$ (8)
 > $\mathrm{simplify}\left(g\right)$
 ${\mathrm{csgn}}{}\left({x}\right){}{x}$ (9)
 > $\mathrm{simplify}\left(g,\mathrm{assume}=\mathrm{real}\right)$
 $\left|{x}\right|$ (10)
 > $\mathrm{simplify}\left(g,\mathrm{assume}=\mathrm{positive}\right)$
 ${x}$ (11)
 > $\mathrm{simplify}\left(g,\mathrm{symbolic}\right)$
 ${x}$ (12)

Simplifying an Integral

 Integrands and summands are simplified taking into account the integration or sum ranges respectively. For more information, see assuming.
 > $\mathrm{expr}:={{∫}}_{1}^{4}{\left(1+{\mathrm{sinh}\left(t\right)}^{2}\right)}^{\frac{1}{2}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}t$
 ${\mathrm{expr}}{:=}{{∫}}_{{1}}^{{4}}\sqrt{{1}{+}{{\mathrm{sinh}}{}\left({t}\right)}^{{2}}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (13)
 > $\mathrm{simplify}\left(\mathrm{expr}\right)$
 ${{∫}}_{{1}}^{{4}}{\mathrm{cosh}}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (14)
 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam


# Random Number Puzzle

Suppose that you have a function that you can use to generate uniformly distributed random numbers between $$1$$ and $$5$$. How can you use the above function to generate uniformly distributed random numbers between $$1$$ and $$7$$?

The key to solving puzzles such as the one above is to first recognize that if we can somehow generate $$7$$ equally likely outcomes then we can use each one of these $$7$$ outcomes to output one of the integers between $$1$$ and $$7$$ as shown below:

$$\text{Outcome}\ 1 \longrightarrow 1$$

$$\text{Outcome}\ 2 \longrightarrow 2$$

$$\text{Outcome}\ 3 \longrightarrow 3$$

$$\text{Outcome}\ 4 \longrightarrow 4$$

$$\text{Outcome}\ 5 \longrightarrow 5$$

$$\text{Outcome}\ 6 \longrightarrow 6$$

$$\text{Outcome}\ 7 \longrightarrow 7$$

So, how can we generate $$7$$ equally likely outcomes when you have a function that only outputs $$5$$ equally likely outcomes. The trick is to change the space of outcomes. One way to change the outcome space is to draw two random numbers uniformly distributed between $$1$$ and $$5$$. The outcome space when we draw two numbers is as follows:

$$\{ (1, 1), (1, 2), (1, 3), (1, 4), (1, 5), \\ (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), \\ (3, 1), (3, 2), (3, 3), (3, 4), (3, 5), \\ (4, 1), (4, 2), (4, 3), (4, 4), (4, 5), \\ (5, 1), (5, 2), (5, 3), (5, 4), (5, 5) \}$$

Of course, now we have $$25$$ equally likely outcomes and not $$7$$. But, what if we were to map $$7$$ of the above outcomes to our desired numbers and ignore the others. In other words, our random number generator to draw random numbers between $$1$$ and $$7$$ does the following:

$$(1, 1) \longrightarrow 1$$

$$(1, 2) \longrightarrow 2$$

$$(1, 3) \longrightarrow 3$$

$$(1, 4) \longrightarrow 4$$

$$(1, 5) \longrightarrow 5$$

$$(2, 1) \longrightarrow 6$$

$$(2, 2) \longrightarrow 7$$

If we obtain any outcome apart from the ones listed above we try again till we obtain one of the above outcomes. All the above outcomes are equally likely and there are $$7$$ outcomes. Thus, one would expect the above procedure to generate uniformly distributed random numbers between $$1$$ and $$7$$.

We could go through the math to convince ourselves but writing a simulation is another way to validate the above intuition. The plot below shows the percentage of times each number occurs in a simulation where we use the above procedure to generate numbers between $$1$$ and $$7$$. Note that the chances of obtaining any of these outcomes is $$\frac{1}{7} \approx 0.143$$. Thus, we have strong evidence that the procedure does generate numbers uniformly between $$1$$ and $$7$$. For those interested, the Python code used to generate the plot is at the end of the post.

A related problem to think about: How can we generate uniformly distributed numbers between $$1$$ and $$30$$ if we have access to a function that only gives us random numbers between $$1$$ and $$5$$?

import random

import matplotlib.pyplot as plt
import seaborn as sns

def draw_histogram(draws):
ax = sns.barplot(x=draws, y=draws, estimator=lambda x: len(x) / len(draws) * 100)
ax.set_xlabel('Number')
ax.set_ylabel('Percentage')
ax.set_ylim(0, 100)

for p in ax.patches:
ax.annotate("%.0f" % p.get_height() + '%', (p.get_x() + p.get_width() / 2., p.get_height() + 3),
ha='center', va='center', fontsize=12, color='black', rotation=0, xytext=(0, 0),
textcoords='offset points')

def generate_rand_between_1_and_7():
draw = None
while draw is None:
draw_1 = random.randint(1, 5)
draw_2 = random.randint(1, 5)
draw_sequence = (draw_1, draw_2)

if draw_sequence == (1, 1):
draw = 1
elif draw_sequence == (1, 2):
draw = 2
elif draw_sequence == (1, 3):
draw = 3
elif draw_sequence == (1, 3):
draw = 3
elif draw_sequence == (1, 4):
draw = 4
elif draw_sequence == (1, 5):
draw = 5
elif draw_sequence == (2, 1):
draw = 6
elif draw_sequence == (2, 2):
draw = 7
else:
pass
return draw

if __name__ == '__main__':
random.seed(42)

no_of_draws = 10000

draws_between_1_and_7 = []
for _ in range(no_of_draws):
draw = generate_rand_between_1_and_7()
draws_between_1_and_7.append(draw)

draw_histogram(draws_between_1_and_7)

plt.savefig('histogram_of_draws.png', bbox_inches='tight')

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


# cumsum

Cumulative sum

### s = cumsum(A)

• A is an array of any number of dimensions.
• The output argument s contains the cumulative sums and has the same size as A.
• The cumulative sums are obtained from vectors along the first non-singleton dimension of A.

Example 1: In the following, the first non-singleton dimension of A is the first dimension. The sum operation is performed along the vertical direction. For instance, s(:,1) contains cumulative sums of elements of A(:,1).

% Matrix of size [3,4]
A=reshape(1:12,3,4)
% Cumulative sums
s=cumsum(A)

A =
1.000   4.000   7.000   10.00
2.000   5.000   8.000   11.00
3.000   6.000   9.000   12.00

s =
1.000   4.000   7.000   10.00
3.000   9.000   15.00   21.00
6.000   15.00   24.00   33.00

### s = cumsum(A, dim)

• dim should be a positive integer scalar, not equal to inf or nan.
• It obtains the cumulative sums along the dim-th dimension of A.
• If size(A,dim) == 1 or dim > ndims(A), then s is the same as A.

Example 2: In the following, The sum operation is performed along the horizontal direction (2nd dimension). For instance, s(1,:) contains cumulative sums of elements of A(1,:).

% Matrix of size [3,4]
A=reshape(1:12,3,4)
% Cumulative sums along 2nd dimension
s=cumsum(A,2)

A =
1.000   4.000   7.000   10.00
2.000   5.000   8.000   11.00
3.000   6.000   9.000   12.00

s =
1.000   5.000   12.00   22.00
2.000   7.000   15.00   26.00
3.000   9.000   18.00   30.00

### s = cumsum(A, option)

• option should be either 'reverse', 'forward', 'includenan' or 'omitnan'.
• These options control the operation direction, or whether or not NaN should be included in the operation. For details, see Tables 1 and 2 below.

Note

By default, cummin and cummax omit NaN, whereas cumsum and cumprod include NaN.

Example 3: Cumulative sums of the same vector but with different options.

a=[1:5 nan 6]
% Default options
cumsum(a)
% Include nan, forward direction
cumsum(a, 'includenan')
% Omit nan, forward direction
cumsum(a, 'omitnan')
% Forward direction, include nan
cumsum(a, 'forward')
% Reverse direction, include nan
cumsum(a, 'reverse')

a =
1.000   2.000   3.000   4.000   5.000    nan   6.000

ans =
1.000   3.000   6.000   10.00   15.00    nan    nan

ans =
1.000   3.000   6.000   10.00   15.00    nan    nan

ans =
1.000   3.000   6.000   10.00   15.00   15.00   21.00

ans =
1.000   3.000   6.000   10.00   15.00    nan    nan

ans =
nan    nan    nan    nan    nan    nan   6.000

Table 1: Options for operation direction.

Option value Meaning Default
'forward' The cumulative sums are obtained in the forward direction. YES
'reverse' The cumulative sums are obtained in the reverse direction. NO

Table 2: Options for including or omitting NaN.

Option value Meaning Default
'includenan' Include NaN in the operation YES
'omitnan' Omit NaN in the opeartion NO

### s = cumsum(A, dim, option)

• Same as s = cumsum(A, dim) above, except that an option can be specified for controlling the operation direction or whether or not NaN should be included.
• See Tables 1 and 2 above for available options.

### s = cumsum(A, option1, option2)

• Same as s = cumsum(A, option) above, except that two options can be specified at the same time.
• option2 will overwrite option1 if they contradict each other.
• See Tables 1 and 2 above for available options.

### s = cumsum(A, dim, option1, option2)

• Same as s = cumsum(A, dim, option) above, except that two options can be specified at the same time.
• option2 will overwrite option1 if they contradict each other.
• See Tables 1 and 2 above for available options.


# Confusion about range of integration for density function

Consider the joint density function:

$$f(x,y) = \begin{cases} 2 & & \text{for } 0 \leq x \leq1 \text{ and } 0 \leq y \leq 1-x, \\[6pt] 0 & & \text{otherwise}. \end{cases}$$

From this joint density I figured out the following marginal densities:

$$f_X(x) = 2(1-x),\\ f_Y(y) = 2.$$

The marginal density $$f_Y$$ is supposedly wrong, as the solutions provided to me say to calculate $$\int^{1-y}_0 2 \, dx$$. I don't see why I need to integrate over $$[0, 1-y]$$ and not over $$[0,1]$$. I thought the range for $$x$$ does not depend on $$y$$, or does it?

• If this is homework, please add the self-study(stats.stackexchange.com/tags/self-study/info) tag. – StubbornAtom Dec 18 '18 at 20:29
• Please: draw a picture showing where $f(x,y)$ is nonzero. That will easily answer your questions. – whuber Dec 18 '18 at 20:50
• @StubbornAtom no it is not homework. this is just a practice exercise, I choose to do myself. – thebilly Dec 18 '18 at 21:34
• @whuber I get a line with the equation y = -x+1 right? When $x = 1$ $y = 1-(x=1) = 0$ I don't quite get yet, how this answers my question. Could you please give me another hint? – thebilly Dec 18 '18 at 21:37
• How did you integrate to find f(x)? What does 0 $\le$ y $\le$ (1-x) imply in terms of the random variable X and not Y? By integrating over [0,1] you are not integrating over the region specified in the question for the joint density but the region for the marginal density of Y. – aranglol Dec 18 '18 at 22:01

Comment: I simulated the joint distribution as an easy way to make the plot suggested in a previous comment. Before beginning to set limits on double integrals it is usually a good idea to sketch such a picture as a guide. I have shown R code for the first of the three plots.

set.seed(1218); m = 10^5
x1 = runif(m);  y1 = runif(m)
cond = (y1 <= 1 - x1)
x = x1[cond];  y = y1[cond]
plot(x, y, pch=".")

The simulation and plots are for orientation, and are not an exact solution to your problem. For exact solutions, maybe the first thing to do is to try to integrate the joint density $$f(x,y) = 2$$ over the triangular region to make sure the integral is $$1,$$ as required for a density function.

Then try integrating over $$x$$ to find the marginal density of $$Y,$$ which is suggested by the red line superimposed on the histogram in the third plot.

You wrote: $$\text{for } 0 \leq x \leq1 \text{ and } 0 \leq y \leq 1-x$$ That tells you the region over which you integrate.

You want to integrate out $$x$$ with $$y$$ fixed.

So you need those values of $$x$$ for which $$0\le x\le1$$ and $$0\le y \le 1-x.$$ Notice that $$y\le 1-x$$ is equivalent to $$x \le 1-y.$$

• Okay. So whenever I have this sort of relationship between x and y regarding the domain I need to have this relationship in both integration intervals? – thebilly Dec 19 '18 at 9:08
• When doing single integration, limits on integral sign need to show $x$-interval over which integration extends. For double integral, limits on two integral signs need to show $(x,y)$ region over which integration extends. – BruceET Dec 24 '18 at 1:41
• @thebilly : This is probably clearer if the constraint on $x$ and $y$ is not symmetric in the two variables. Suppose you have $0\le x \le 1$ and for each value of $x$ in that interval you have $0\le y \le 3(1-x).$ Then$\,\ldots\qquad$ – Michael Hardy Dec 25 '18 at 19:26
• $\ldots\,\,$you have \begin{align} & \int_0^1\left( \int_0^{3(1-x)} \cdots\cdots \, dy \right) \, dx \\ \\ = {} & \iint\limits_{\left\{ (x,y) \,:\, \begin{smallmatrix} 0 \, \le \, x \,\le\, 1 \\ \&\ 0\,\le\,y\,\le\, 3(1-x) \end{smallmatrix} \right\}} \quad \cdots\cdots \, d(x,y) \\ \\ = {} & \iint\limits_{\left\{ (x,y) \,:\, 0\,\le\, x\,\le\, \frac{3-y} 3 \,\le\, 1 \right\}} \quad \cdots\cdots \, d(x,y) \\ \\ = {} & \int_0^3 \left( \int_0^{(3-y)/3} \cdots\cdots \, dx \right) \, dy. \end{align} – Michael Hardy Dec 25 '18 at 19:32
• In other words, if you have $x$ going from $0$ to $1$ and then for any fixed value of $x$ you have $y$ going from $0$ to $3(1-x),$ and that's the same as saying $y$ is between $0$ and $3,$ and for each fixed value of $y$ between $0$ and $3$ you have $x$ going from $0$ to $(3-y)/3. \qquad$ – Michael Hardy Dec 25 '18 at 19:37


# Does $a_{n}/a_{n-1}$ converge to the golden ratio for all Fibonacci-like sequences?

Yesterday a friend challenged me to prove that $$\lim_{n\rightarrow\infty}\frac{a_n}{a_{n-1}}=\varphi\; ,$$ where $$\varphi$$ is the golden ratio, for the Fibonacci series.

I started rewriting the limit as

$$\lim_{n\rightarrow\infty}\frac{a_n}{a_{n-1}}=\lim_{n\rightarrow\infty}\frac{a_{n-1}+a_{n-2}}{a_{n-1}}=\lim_{n\rightarrow\infty}1+\frac{a_{n-2}}{a_{n-1}}\; .$$

If the sequence $$b_n=\frac{a_n}{a_{n-1}}$$ is convergent,

$$\lim_{n\rightarrow\infty}\frac{a_{n-2}}{a_{n-1}}=\left(\lim_{n\rightarrow\infty}\frac{a_n}{a_{n-1}}\right)^{-1}\; .$$

Renaming the desired limit $$x$$, we obtain the quadratic equation

$$x=1+\frac{1}{x}$$ $$x^2-x-1=0$$

if $$x\neq 0$$. Therefore, if $$b_n$$ is convergent, it must be equal to $$\frac{1+\sqrt{5}}{2}$$ or $$\frac{1-\sqrt{5}}{2}$$.

Since $$a_n>0$$, $$b_n>0, \forall n$$, so the limit must be equal to $$\varphi=\frac{1+\sqrt{5}}{2}$$.

This proof made me think that I didn't make use of the initial values of the sequence, so it must hold true for any sequence where $$a_{n}=a_{n-1}+a_{n-2}$$. The first question is, is $$a_{n}/a_{n-1}$$ convergent for all Fibonacci-like sequences?

The second and most intriguing for me is, is there any Fibonacci-like sequence where the limit is $$\frac{1-\sqrt{5}}{2}$$? Since this solution is negative, $$a_n$$ should change its sing with each $$n$$, but I couldn't find any values for $$a_0$$ and $$a_1$$, which would lead me to this case. If the answer to this question is no, what mathematical sense does this negative solution have?

• Yup, interestingly enough, almost all "Fibonacci-like" sequences (in that they start with two seed values and then recursively define the successive terms by the addition of the previous two), except for certain trivial examples, have the ratio of successive terms converge to $\phi$. Another noteworthy such sequence is that of the Lucas numbers (with seeds $L_1 = 2$ and $L_2 = 1$, which actually is a lot "neater" than the Fibonacci sequence in this respect. – Eevee Trainer Nov 16 '18 at 8:26
• As for the notion of $\phi$'s conjugate being the ratio of successive terms, no, at least ignoring trivial examples. You could analogize this in terms of "stable" and "unstable" solutions: the conjugate is unstable, where the regular one is stable. In the case of $\phi$'s conjugate, unless you somehow trivially start with that conjugate as the ratio of successive terms (see Robert Z's answer), this means that successive terms eventually diverge away from it. Showing this lack of stability isn't trivial though and I'm mostly parroting other facts and don't feel qualified to elaborate on it. – Eevee Trainer Nov 16 '18 at 8:32

One way to look at this problem is that if $$a_{n+1}=a_n+a_{n-1}$$, then we we have $$\begin{pmatrix}0&1\\1&1\end{pmatrix}\begin{pmatrix}a_{n-1}\\a_n\end{pmatrix}=\begin{pmatrix}a_n\\a_{n+1}\end{pmatrix}.$$

The eigenvalues of the matrix

$$\begin{pmatrix}0&1\\1&1\end{pmatrix}$$

are $$\dfrac{1+\sqrt{5}}{2},\dfrac{1-\sqrt{5}}{2}.$$

These have corresponding eigenvectors $$v_1,v_2$$ which span $$\mathbb{R}^2$$. This leads us to the conclusion that $$\begin{pmatrix}a_1\\a_2\end{pmatrix}=cv_1+bv_2,$$ and if $$c\not=0,$$ then $$v_1$$ will dominate the sequence, and we can show the ratios converge to $$(1+\sqrt{5})/2.$$ This leads us to the conclusion that if we want a Fibonacci like sequence to have ratios converging to $$(1-\sqrt{5})/2$$, then we must have $$\begin{pmatrix}a_1\\a_2\end{pmatrix}=bv_2$$ for some non zero $$b\in\mathbb{R}$$. So to determine all such sequences we simply have to have an eigenvector $$v_2$$ corresponding to $$(1-\sqrt{5})/2$$. One such eigenvector is $$\begin{pmatrix}1\\\dfrac{1-\sqrt{5}}{2}\end{pmatrix}.$$

• Thank you, your answer gives me the relation $a_0$ and $a_1$ must fulfill in order to make the limit $\frac{1-\sqrt{5}}{2}$. – TheAverageHijano Nov 16 '18 at 15:37

You showed that if a limit exists for $$a_{n}/a_{n-1}$$ and $$a_n>0$$, then it is $$\frac{1+\sqrt{5}}{2}$$. Actually if $$(a_n)_{n\geq 0}$$ is any sequence which satisfies the recurrence $$a_n=a_{n-1} + a_{n-2}$$ then there exist $$A$$ and $$B$$ such that $$a_n=A\cdot \left(\frac{1+\sqrt{5}}{2}\right)^n+B\cdot \left(\frac{1-\sqrt{5}}{2}\right)^n$$ where $$A$$ and $$B$$ depend on the initial terms $$a_0$$ and $$a_1$$.

So what is $$\lim_{n\rightarrow\infty}\frac{a_n}{a_{n-1}}$$ in the general case?

Consider for example the case when $$A=0$$ and $$B\not=0$$. What is the limit?

• So, basically if $A\neq 0$, the limit will be the golden ratio, and if $A=0$ and $B\neq 0$, the ratio will be $\frac{1-\sqrt{5}}{2}$, right? – TheAverageHijano Nov 16 '18 at 8:40
• Yes, that's true. – Robert Z Nov 16 '18 at 8:42
• Robert Z could you prove the thing about $a_n$? – AryanSonwatikar Nov 17 '18 at 4:56
• @AryanSonwatikar This is a standard result about "homogeneous linear recurrences". See math.stackexchange.com/questions/65011/… – Robert Z Nov 17 '18 at 6:55

Here is a another view of this. We have $$b_n=a_n/a_{n-1}$$ and $$b_{n+1}=1+\frac1{b_n},\tag{*}$$ or, \begin{align*} b_{n+1}&=1+\frac1{1+\cfrac1{b_{n-1}}}=1+\cfrac1{1+\frac1{1+\frac1{1+\frac1{1+\cdots}}}}. \end{align*} We should be clear about what we actually mean by an expression like this. One way that we could think about it is to starting with some constant like $$1$$, and then repeatly applying the function $$f(x)=1+\dfrac 1x$$, \begin{align*} c&=1&&=1.000\dots\\ \color{yellow}{f(}c\color{yellow}{)}&=\color{yellow}{1+\frac1{\color{black}{1}}}&&=2.000\dots\\ \color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}&=\ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{1}}}}}&&=1.500\dots\\ \color{magenta}{f(}\color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}\color{magenta}{)}&=\color{magenta}{1+\frac 1{ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{1}}}}}}}&&=1.667\dots\\ \color{violet}{f(}\color{magenta}{f(}\color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}\color{magenta}{)}\color{violet}{)}&=\color{violet}{1+\frac 1{\color{magenta}{1+\frac 1{ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{1}}}}}}}}}&&=1.600\dots \end{align*} Symbolly what we get is more and more like our infinite fraction. If we start with $$-1/\varphi$$, \begin{align*} c&=-1/\varphi&&=-0.618\dots\\ \color{yellow}{f(}c\color{yellow}{)}&=\color{yellow}{1+\frac1{\color{black}{-1/\varphi}}}&&=-0.618\dots\\ \color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}&=\ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{-1/\varphi}}}}}&&=-0.618\dots\\ \color{magenta}{f(}\color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}\color{magenta}{)}&=\color{magenta}{1+\frac 1{ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{-1/\varphi}}}}}}}&&=-0.618\dots\\ \color{violet}{f(}\color{magenta}{f(}\color{orange}{f(}\color{yellow}{f(}c\color{yellow}{)} \color{orange}{)}\color{magenta}{)}\color{violet}{)}&=\color{violet}{1+\frac 1{\color{magenta}{1+\frac 1{ \color{orange}{1+\frac{1}{\color{yellow}{1+\frac1{\color{black}{-1/\varphi}}}}}}}}}&&=-0.618\dots \end{align*} So no matter how many times we apply it, we're staying fixed at $$-1/\varphi$$. But even then, with the aid of a calculator, if we start with a random number $$\neq-1/\varphi$$ (even it's really close to $$-1/\varphi$$) and perform iteration $$x\to x+\dfrac 1x$$ again and again, we eventually end up at $$1.618...=\varphi$$. So,

why the fixed point $$\varphi$$ favored above the other one $$-1/\varphi$$?

The transformational understanding of derivatives is going to be helpful for understanding this set up. Now we know that $$\varphi$$ and $$-1/\varphi$$ stay fixed in place during this iteration process. But zoom in on a neighborhood around $$\varphi$$, during each iteration, points in that region get contracted around $$\varphi$$, meaning that the function $$1+\dfrac 1x$$ has a derivative with a magnitude that is less than $$1$$ at this input. In fact, the derivative works out around to be $$\left|\frac{df}{dx}(\varphi)\right|\approx |-0.38|<1,$$ meaning that each repeated application scrunches the neighborhood around this number smaller and smaller like a gravitational pull towards $$\varphi$$.

Conversely, at $$-1/\varphi$$, the magnitude of the derivative actually has a magnitude greater than $$1$$, $$\left|\frac{df}{dx}\left(-\frac 1\varphi\right)\right|\approx |-2.62|>1,$$ so points near the fixed point are repelled away from it. We can see that they get stretched by more than a factor of $$2$$ in each iteration. (They also get flipped around because the derivative is negative here, but the salient fact of stability is just the magnitude.)

We will call $$\varphi$$ a "stable fixed point", and $$-1/\varphi$$ an "unstable fixed point". As we can see the stability of a fixed point is determined by whether or not of its derivative is bigger or smaller than $$1$$. And this explains why $$\varphi$$ always shows up in the limit.

Reference: 3Blue1Brown.

• Nice, I didn't think about stability theory to explain my question. It's nice that we can approach the problem from different but equivalent perspectives. – TheAverageHijano Nov 16 '18 at 15:42

Yes, $$a_n\over a_{n-1}$$ is convergent for any Fibonacci-esque sequence(with integers), and this happen to be the golden ratio, $$\varphi$$. The limit $$1-\sqrt{5}\over 2$$ will never occur for a Fibonacci-esque sequence. The negative solution crops up because you multiply both sides by $$x$$ when you solve $$x=1+\frac{1}{x}$$ leading to an extra solution. But this value is useful for calculating the value of the $$n^{th}$$ term of the Fibonacci sequence. $$F_n=\frac{\varphi^n - (\frac{-1}{\varphi})^n}{\sqrt{5}}$$ Hope this helps.

• Actually, $a_0=1$ and $a_1=\frac{1-\sqrt{5}}{2}$ is one of the combinations that will make $\lim_{n\rightarrow\infty}\frac{a_n}{a_{n-1}}=\frac{1-\sqrt{5}}{2}$ (see Melody's answer). Multiplying both sides by x (if $x\neq 0$) shouldn't give illogical answers. Whether they have actual/physical meaning or not is another matter. – TheAverageHijano Nov 16 '18 at 15:48
• That is true, but my answer says integers. If you take $a_0=1$ , and round off the values to the nearest integer, you get the sequence: $1,-1,0,-1..$ and here the limit suddenly tends to negative infinity because of the third term. – AryanSonwatikar Nov 17 '18 at 2:56
• Also, I'm not well versed with matrices and vectors so Melody's answer is obscure for me. – AryanSonwatikar Nov 17 '18 at 3:00
• Also, for the sequence you get, the Fibonacci-ness is followed only upto the fourth term after which if we follow the ratio and if we follow the Fibonacci-ness we get two different sequences. – AryanSonwatikar Nov 17 '18 at 4:21