# Definition of limit as $x\rightarrow \infty$

Every time i get confused with the definition of $\lim_{x\rightarrow \infty}f(x)=L$. I could not find a reference that will give the definition.

I am trying to write what i understood. See if this is correct.

• By $\lim_{x\rightarrow \infty}f(x)=L$ we mean the following : Given $\epsilon >0$ there exists $R>0$ such that $|f(x)-L|<\epsilon$ for all $x>R$.
• By $\lim_{x\rightarrow -\infty}f(x)=L$ we mean the following : Given $\epsilon >0$ there exists $R<0$ such that $|f(x)-L|<\epsilon$ for all $x<R$.
• By $\lim_{x\rightarrow \infty}f(x)=\infty$ we mean the following: Given $R>0$ there exists $L>0$ such that $|f(x)|>R$ for all $x>L$
• By $\lim_{x\rightarrow \infty}f(x)=-\infty$ we mean the following: Given $R<0$ there exists $L>0$ such that $f(x)<R$ for all $x>L$
• By $\lim_{x\rightarrow -\infty}f(x)=\infty$ we mean the following: Given $R>0$ there exists $L<0$ such that $|f(x)|>R$ for all $x<L$
• By $\lim_{x\rightarrow \infty}f(x)=-\infty$ we mean the following: Given $R<0$ there exists $L<0$ such that $f(x)<R$ for all $x<L$.

Let me know if i understood somethings wrongly.

• It's quite fine for me. The signs for $R$ and $L$ are unncessary (they're implicit). – Bernard Apr 15 '16 at 14:25
• You don't, technically, need $R<0//R>0$. for the first two. It can be any $R$. It's the "for all $x>R$" and "for all $x<R$" that makes the difference, not the sign of $R$. – Thomas Andrews Apr 15 '16 at 14:25
• If there is no need for sign then $x\rightarrow \infty$ and $x\rightarrow -\infty$ would mean the same thing? @Bernard – user311526 Apr 15 '16 at 14:27
• If there is no need for sign then $x\rightarrow \infty$ and $x\rightarrow -\infty$ would mean the same thing? @ThomasAndrews – user311526 Apr 15 '16 at 14:27
• @topgeomj No, because one definition uses $x>R$ and the other $x<R$. That is the difference, not the sign of $R$. – Thomas Andrews Apr 15 '16 at 14:28

I will use $+\infty$ in this answer to avoid ambiguity.

• $\lim_{x\to +\infty} f(x) = L$ means for all $\epsilon>0$ there exists $M$ such that for all $x>M,$ $|f(x)-L|<\epsilon$ .

• $\lim_{x\to+\infty} f(x)=+\infty$ means for all $R$ there exists $M$ such that for all $x>M$, $f(x)>R$.

Those two definitions let you define the other limits by symmetry:

\begin{align} \lim_{x\to+\infty} f(x) = -\infty&\iff \lim_{x\to+\infty} -f(x)=+\infty\\ \lim_{x\to-\infty} f(x) = M &\iff \lim_{x\to+\infty} f(-x)=M \end{align}

Where the $M$ in the second case can be any of either a real value, or $+\infty,-\infty$.

So $\lim_{x\to-\infty} f(x)= -\infty$ means $\lim_{x\to +\infty} -f(-x)=+\infty$, which means:

For any $R$ there is an $M$ so that for all $x>M$, $-f(-x)>R$.

Now, given any $R'$, you can set $R=-R'$ and find $M$ with this condition, and set $M'=-M$. Then if $x<M'$, $-x>M$, and thus $-f(x)>R$ or $f(x)<R'=-R$. So we get back the definition that we want.

The reason to distinguish $+\infty$ from $\infty$ is that some books use $\infty$ means a single point at infinity, in both directions - essentially, merging the two values $+\infty,-\infty$ into a single point at infinity.

Then:

$$\lim_{x\to\infty} f(x)= L \iff \lim_{x\to+\infty} f(x)=\lim_{x\to-\infty} f(x)=L$$

where $L$ can be any real or $+\infty,-\infty$.

$$\lim_{x\to W} f(x) = \infty\iff \lim_{x\to W} |f(x)|=+\infty$$

Where $W$ can be any real, or $+\infty$ or $-\infty$, or $\infty$.

Your question is somehwat confused, because you seem to distingush $\infty$ from $+\infty$ with absolute values when $\infty$ is the limit, but not when $x\to\infty$.

• Thanks... I understand this clearly... :) – user311526 Apr 15 '16 at 15:04

One also does not need the absolute values on $|f(x)| > R$. If f is going to infinity, then $f(x) > R$ is accurate.

• For $f(x) = (-1)^{[x]}e^x$, $f(x) \to \infty | x \to +\infty$, but not $f(x) \to +\infty | x \to +\infty$. – Abstraction Apr 15 '16 at 14:34
• Ok.. Can you say something about other definitions as well.. – user311526 Apr 15 '16 at 14:34
• @Abstraction Some people distinguish between $+\infty$ and $\infty$, but quite often they are used interchangably. – Thomas Andrews Apr 15 '16 at 14:59
• @ThomasAndrews Seeing as third and fifth examples in the initial post clearly distinguish between $f(x) \to +\infty$ and $f(x) \to \infty$ (using absolute value of $f(x)$), I think here the distinction is important. – Abstraction Apr 15 '16 at 15:08
• Well, the main indication that the OP is using $\infty$ to mean a single point at infinity is the absolute values, but in the $x\to\infty$ examples, the definitions do not use $|x|>L$. So the clarity is not there in the question. @Abstraction – Thomas Andrews Apr 15 '16 at 15:11

Let me know if i understood somethings wrongly.

You did. When you write $x \to \infty$ (as opposed to $x \to +\infty$), for $x \in \mathbb{R}$ it roughly means "when absolute value of $x$ is arbitrarily large" ($|x| > R$, not $x > R$)

There is a universal definition of limit using filters. A filter $\mathcal{F}$ is a collection of sets such that it doesn't contain an empty set and $\forall f_1, f_2 \in \mathcal{F}, \exists f_3 \in \mathcal{F} : f_3 \subseteq f_1 \cap f_2$. For example, a set of neighbourhoods of a real point $x$ is a filter ($\{(x-\epsilon, x+\epsilon) | \epsilon \in \mathbb{R}^+\}$, called neighbourhoods filter); a set of intervals with infinite endpoint ($\{(a,+\infty) | a \in \mathbb{R}\}$) is a filter; a set of segment complements ($\{(-\infty,a)\cup(b,+\infty) | a,b \in \mathbb{R}\}$) is a filter.

Now, let's take function $h \in \{X \to Y\}$ and there is a filter $\mathcal{F}$ on $X$ and a concept of "neighbourhoods" on $Y$ (called topology). Then let's take this sentence: "there is such $y \in Y$ that for any $y$ neighbourhood $O_y$, there is a filter element $f \in \mathcal{F}$ so that $h(f) \subseteq O_y$" and write it for short as $\lim_{\mathcal{F}}h(x) = y$.

Lets write filter $\{(a,+\infty) | a \in \mathbb{R}\}$ as $x \to +\infty$, filter $\{(-\infty,a) | a \in \mathbb{R}\}$ as $x \to -\infty$ and filter $\{(-\infty,a) \cup (a,+\infty) | a \in \mathbb{R}\}$ as $x \to \infty$.

Finally, let's call set $\{(L-\epsilon,L+\epsilon) | \epsilon \in \mathbb{R}\}$ a set of neighbourhoods of $L$, set $\{(b,+\infty) | b \in \mathbb{R}\}$ a set of neighbourhoods of $+\infty$, set $\{(-\infty,b) | b \in \mathbb{R}\}$ a set of neighbourhoods of $-\infty$ and set $\{(-\infty,b) \cup (b,+\infty) | b \in \mathbb{R}\}$ a set of neighbourhoods of $\infty$.

Now from these rules we can derive any definition. Take $\lim_{x \to -\infty}f(x) = +\infty$. It comes to "for any $+\infty$ neighbourhood $(b,+\infty), b \in \mathbb{R}$, there is a filter element $(-\infty,a), a \in \mathbb{R}$ so that $f((-\infty,a)) \subseteq (b,+\infty)$". Or, in more traditional notation, $$\forall b \in \mathbb{R}, \exists a \in \mathbb{R} : \forall x \in (-\infty,a), f(x) \in (b,+\infty)$$

• May be you are complication the question by saying more advanced things as filter, topology... – user312648 Apr 15 '16 at 16:09
• @cello Maybe. But memorizing definitions for all cases of $x \to \pm\infty$ is actually hard, filters help to see some logic in all this. "Topology" here is simply a proper naming for a system of neighbourhoods; as you can see, it's properties aren't used. – Abstraction Apr 15 '16 at 16:21


# Help with matrix derivative

In my studies of applied mathematics, specifically optimization and applied linear algebra, I have come across the following expression which I need help differentiating:

$z(B,C) = \lVert Y-B \phi(CX) \rVert_F ^2 = \text{trace} \left( (Y-B \phi(CX))(Y-B \phi(CX))^T \right)$

where $Y \in \mathbb{R}^{m\times s},X\in \mathbb{R}^{n\times s}$ are two constant real matrices, $B \in \mathbb{R} ^{m\times k}$ and $C\in\mathbb{R}^{k \times n}$ are the two variable matrices of the function $z(B,C)$ defined above, $\lVert \bullet \rVert_F$ is the Frobenius norm and all matrix dimensions involved are constant and non-variable.

The function $\phi : \mathbb{R} \to \mathbb{R}$ is a nonlinear function defined for real numbers as follows:

$\phi(x) = \left\{ \begin{array}{ll} 0 & x \leq 0 \\ x & x > 0 \\ \end{array} \right.$

and we extend its definition to matrices element-wise, that is $(\phi(A))_{i,j} = \phi((A)_{i,j})$.

I would like to find the matrix derivative of the function $z$, as stated above, with respect to $C$, that is $\frac{\partial z}{\partial C}$.

Differentiating with respect to $B$ is easy enough as $C$ doesn't impede applying standard formulas, but my problem is with differentiating with respect to $C$ as it is the argument of a nonlinear function and I do not know how to derive it with respect to matrices.

I was hoping someone could please come to the rescue and help me differentiate the function $z$ with respect to $C$. I thank all helpers.

• In the first derivative, is A supposed to be C? – John Polcari Jul 8 '18 at 16:31
• Does this book have copy right? This not allowed on this website – Cloud JR K Jul 8 '18 at 16:46
• @JohnPolcari : yes fixed it now – kroner Jul 8 '18 at 16:49
• @CloudJR : no, it is OK – kroner Jul 8 '18 at 16:50
• @JohnPolcari : thanks for pointing out – kroner Jul 8 '18 at 16:51

Let's use a convention where uppercase Latin letters represent matrices, lowercase Latin vectors, and Greek letters are scalars.

The function you've denoted by $\phi$ is the ReLU function, $r(\alpha)$, whose derivative is the Heaviside step function $$h(\alpha) = \frac{dr(\alpha)}{d\alpha} \implies dr = h\,d\alpha$$ Applying these scalar functions element-wise on a matrix argument $A=CX,$ produces matrix results, which we'll denote as \eqalign{ R &= r(A) \cr H &= h(A) \implies dR = H\odot dA = H\odot(dC\,X) \cr } where $\odot$ is the elementwise/Hadamard product.

Define a new matrix variable $$M=BR-Y \implies dM = B\,dR + dB\,R$$ Write the function in terms of this new variable, then find its differential. \eqalign{ \lambda &= \|M\|^2_F = M:M \cr d\lambda &= 2M:dM \cr &= 2M:B\,dR + 2M:dB\,R \cr &= 2B^TM:dR + 2MR^T:dB \cr &= 2B^TM:H\odot(dC\,X) + 2MR^T:dB \cr &= 2(B^TM)\odot H:(dC\,X) + 2MR^T:dB \cr &= 2((B^TM)\odot H)X^T:dC + 2MR^T:dB \cr } Setting $dB=0$ yields the gradient wrt $C$ $$\frac{\partial\lambda}{\partial C} = 2((B^TM)\odot H)X^T$$ And setting $dC=0$ yields the gradient wrt $B$ $$\frac{\partial\lambda}{\partial B} = 2MR^T$$

NB: Depending on your preferred layout convention, you may need to transpose these results.

Also, the colon notation used above (called the Frobenius product) is just a convenient way of writing the trace function, i.e. $\,\,A:B={\rm tr}(A^TB)$.

The cyclic property of the trace leads to several ways to rearrange the terms in a Frobenius product. For example, all of the following expressions are equivalent \eqalign{ A:BC &= A^T:(BC)^T \cr &= BC:A \cr &= AC^T:B \cr &= B^TA:C \cr }

• Thanks for pointing out the name of $\phi$ as I was not aware of this. – kroner Jul 8 '18 at 17:26
• Thanks for your masterpiece answer, I appreciate it. – kroner Jul 8 '18 at 17:27


# I Help with set theory notation

1. Jan 27, 2017

### Jehannum

I bought a maths book and have discovered it's somewhat above my level.

In particular I'm confused about one bit of notation. I understand the "is a member of" operator when it takes a set as argument (e.g. n ∈ ℝ) but not when the book uses it with functions (e.g. n ∈ f)

Does n ∈ f mean that the number n can be returned by function f?

2. Jan 27, 2017

### PeroK

You need to give more context. My guess is that a function can be seen as a set. For example, the function $f(x) = x^2$ can be seen as the set of points $\lbrace (x, x^2): x \in \mathbb{R} \rbrace$, also commonly known as the graph of $f$.

In this case, you could use the notation: $f = \lbrace (x, x^2): x \in \mathbb{R} \rbrace$.

And, here, $n \in f$ would mean that $n = (x, x^2)$ for some real $x$.

3. Jan 27, 2017

### Staff: Mentor

This is strange, not to say wrong. A function $f\, : \,X \rightarrow Y$ can be written as a subset $f=\{(x,y)\,\vert \,y=f(x)\} \subseteq X \times Y$ of the Cartesian product, but this cannot explain the notation $n \in f$ unless $n$ is a pair. Can you give some more context?

4. Jan 27, 2017

### Staff: Mentor

5. Jan 29, 2017

### Jehannum

I've copied part of the book below:

Theorem 2.2 There are infinite sets that are not enumerable.
Proof Consider the powerset of N, in other words the collection P whose members are all the sets of numbers (so X ∈ P iff X ⊆ N).
Suppose for reductio that there is a function f : N→P which enumerates P, and consider what we’ll call the diagonal set D ⊆ N such that n ∈ D iff n /∈ f(n).
Since D ∈ P and f by hypothesis enumerates all the members of P, there must be some number d such that f(d) = D.
So we have, for all numbers n, n ∈ f(d) iff n /∈ f(n). Hence in particular d ∈ f(d) iff d /∈ f(d). Contradiction!

6. Jan 29, 2017

### pasmith

That's not what the text is saying.

This is defining $f$ as a function from the natural numbers $\mathbb{N}$ to the collection $P$ of subsets of natural numbers. Thus if $n \in \mathbb{N}$ then $f(n) \subset \mathbb{N}$. The statement $n \in f(n)$ is therefore perfectly sensible, since it always makes sense to ask if a particular natural number is or is not a member of a particular subset of the natural numbers.

7. Jan 29, 2017

### Staff: Mentor

O.k., but this is not what you wrote. $n \in f$ is something different to $n \in f(n)$ where $f: \mathbb{N}\rightarrow \mathcal{P}(\mathbb{N})$ is a function which values are sets $X$, so $n \in X=f(n) \in \mathcal{P}(\mathbb{N})$ makes sense. This is not the same as $n \in f \in \mathcal{P}( \mathbb{N} \times \mathbb{N})$ which we explained in the previous posts.

The theorem is proven by the so called diagonal argument. It is a formal notation of the following principle:

We want to show, that the set of all subsets of $\mathbb{N}$ isn't enumerable.

If we have an element $X \in \mathcal{P}(\mathbb{N})$, i.e. a subset $X \subseteq \mathbb{N}$, then we can write it down number by number: $X= n_1n_2n_3n_4 \ldots$
Now let's assume $\mathcal{P}(\mathbb{N})$ is enumerable. Then there would be a complete list like
$$\begin{matrix} 1: &X_1 & = & n_{11}n_{12}n_{13} \ldots \\ 2: &X_2 & = & n_{21}n_{22}n_{23} \ldots \\ 3: & X_3 & = & n_{31}n_{32}n_{33} \ldots \\ &\vdots &&\\ \end{matrix}$$
which contains all elements of $\mathcal{P}(\mathbb{N})$, or subsets of $\mathbb{N}$.
The diagonal $d$ is now the number $d=n_{11}n_{22}n_{33} \ldots$ We next add $+1$ to all of the numbers $n_{ii}\,$.
Since by assumption we have enumerated all, this new number $d'$ (or subset $d'=\{n_{11}+1,n_{22}+1,n_{33}+1, \ldots\}$ if you like) has to occur somewhere, say $d'=X_k$. However the $k-$th position of $d'$ is $n_{kk}$ by enumeration of the $X_i$ and $n_{kk}+1$ by construction of $d'$. This cannot both be true, which means there is no way to enumerate $\mathcal{P}(\mathbb{N})$.

You might want to read the proof in the book again and figure out, why both are basically the same. It is also the method used to show why $[0,1]$ or $\mathbb{R}$ are uncountable. Whether $|\mathcal{P}(\mathbb{N})| = |\mathbb{R}|$ holds is called the continuum hypothesis. It cannot be deduced from the usual axioms of set theory, i.e. by the Zermelo-Fraenkel axioms (ZF). If you read ZFC somewhere, then Zermelo-Fraenkel + Contnuum hypothesis is meant. (Usually it is also assumed, if nothing is said.)

8. Jan 29, 2017

### micromass

Staff Emeritus
That is not the continuum hypothesis and it can be proven in ZFC.

9. Jan 29, 2017

### micromass

Staff Emeritus
ZFC means Zermelo-Fraenkel with choice. Not the continuum hypothesis.

10. Jan 29, 2017

### Jehannum

Thanks. It's becoming clear now.

Boggled by some of the unfamiliar notation and concepts, I was not appreciating the fact that the function f returns a set as its result, so the ∈ operator can of course be used on the outputs of f such as f (n).

The book itself moves onto such diagonal proofs.

11. Jan 29, 2017

### Staff: Mentor

Thanks for clarification.
Oops, I just had a quick look on Wiki to be sure, for I know I tend to forget where the "gap" really is, and only saw $\mathfrak{c}=\aleph_1$ and next $2^{\aleph_0}=\aleph_1$. I should have read it with more care ...
Thanks for the corrections.


# Math Help - 3*2 Matrix with complex elements

1. ## 3*2 Matrix with complex elements

Folks,

Given that the set of all 3*2 matrices with complex elements is a complex vector space, with the usual definitions of addition and scalr multiplication of matrices, what is its dimension?

Are the following subsets subspaces?

1) The set of 3*2 with real entries

2) The set of matrices with first row (0,0)

3) The set of matrices with first row (1,1)

I understand the dimension of a vector space is the number of vectros in any basis for the space, ie the number of coordinates necessary to specify any vector. How do I find out what its dimension is?

Thanks

2. ## Re: 3*2 Matrix with complex elements

the "naive" way is to ask yourself: how many complex numbers do i need to specify to identify my "vector"? for 3x2 matrices, that number is 6 (one for each entry).

however, mathematics professors being what they are, will usually insist you display a basis (a linearly independent spanning set). can you think of a set of six matrices,

each of which captures the idea of "a single matrix coordinate"? once you have done this, show linear independence and spanning.

again, with any vector space V, there are 3 things you need to show for any subset W:

1) W is non-empty (preferrably by showing the 0-element is a member. if the 0-element (0-vector) is not in W, you will not obtain a vector space).
2) if u,v are in W then their vector sum u+v must also be.
3) if c is any scalar in your underlying field, and u is in W, then cu must also be in W. be careful with this one. if you are working with a complex vector space, it is not sufficient to check this property for real scalars only.

attempt to show these properties (or give a counter-example) for each of the sets in your post. that's how it's done.

3. ## Re: 3*2 Matrix with complex elements

Originally Posted by Deveno
the "naive" way is to ask yourself: how many complex numbers do i need to specify to identify my "vector"? for 3x2 matrices, that number is 6 (one for each entry).

can you think of a set of six matrices, each of which captures the idea of "a single matrix coordinate"? once you have done this, show linear independence and spanning.
Sorry, I am still struggling to get a start...I dont know how to approach this? If its a 3*2 matrix then would it have 3 solutions in ${\mathbb{R}^3}$?

4. ## Re: 3*2 Matrix with complex elements

If I write a sample 3*2 matrix as

$\begin{bmatrix}2 & 5\\ 1 & 4 \\ 6 & 8 \end{bmatrix}$

THis matrix contains 6 real entries, but I am unbale to write expression since I believe I need it to be a 3*3 or a 2*3 matrix. How would I proceed to show its closed under vector addition and scalar multiplication?

Thanks

5. ## Re: 3*2 Matrix with complex elements

you're not being asked to "solve" a system of linear equations, you're being asked to display a basis for a vector space.

here is a similar problem:

find the dimension of the vector space of all 2x2 complex matrices.

i claim:

$\left\{\begin{bmatrix}1&0\\0&0\end{bmatrix},\begin {bmatrix}0&1\\0&0\end{bmatrix}, \begin{bmatrix}0&0\\ 1&0 \end{bmatrix},\begin{bmatrix}0&0\\0&1\end{bmatrix} \right\}$

is a basis for this vector space. clearly this is a spaning set, since:

$\begin{bmatrix}a&b\\c&d\end{bmatrix} = a\begin{bmatrix}1&0\\0&0\end{bmatrix} + b\begin{bmatrix}0&1\\0&0\end{bmatrix} + c\begin{bmatrix}0&0\\1&0\end{bmatrix} + d\begin{bmatrix}0&0\\0&1\end{bmatrix}$

now, to show linear independence, suppose that:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = c_1\begin{bmatrix}1&0\\0&0\end{bmatrix} + c_2\begin{bmatrix}0&1\\0&0\end{bmatrix} + c_3\begin{bmatrix}0&0\\1&0\end{bmatrix} + c_4\begin{bmatrix}0&0\\0&1\end{bmatrix}$

then:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = \begin{bmatrix}c_1&c_2\\c_3&c_4\end{bmatrix}$

so $c_1 = c_2 = c_3 = c_4 = 0$ so our set is linearly independent, and is thus a basis.

since our basis has 4 elements, the dimension of the vector space is 4.

6. ## Re: 3*2 Matrix with complex elements

Originally Posted by Deveno
you're not being asked to "solve" a system of linear equations, you're being asked to display a basis for a vector space.

here is a similar problem:

find the dimension of the vector space of all 2x2 complex matrices.

i claim:

$\left\{\begin{bmatrix}1&0\\0&0\end{bmatrix},\begin {bmatrix}0&1\\0&0\end{bmatrix}, \begin{bmatrix}0&0\\ 1&0 \end{bmatrix},\begin{bmatrix}0&0\\0&1\end{bmatrix} \right\}$

is a basis for this vector space. clearly this is a spaning set, since:

$\begin{bmatrix}a&b\\c&d\end{bmatrix} = a\begin{bmatrix}1&0\\0&0\end{bmatrix} + b\begin{bmatrix}0&1\\0&0\end{bmatrix} + c\begin{bmatrix}0&0\\1&0\end{bmatrix} + d\begin{bmatrix}0&0\\0&1\end{bmatrix}$

now, to show linear independence, suppose that:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = c_1\begin{bmatrix}1&0\\0&0\end{bmatrix} + c_2\begin{bmatrix}0&1\\0&0\end{bmatrix} + c_3\begin{bmatrix}0&0\\1&0\end{bmatrix} + c_4\begin{bmatrix}0&0\\0&1\end{bmatrix}$

then:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = \begin{bmatrix}c_1&c_2\\c_3&c_4\end{bmatrix}$

so $c_1 = c_2 = c_3 = c_4 = 0$ so our set is linearly independent, and is thus a basis.

since our basis has 4 elements, the dimension of the vector space is 4.
I can only write 4 of the required 6 matrices...

$\left[ \begin{array}{ccc} 1 & 0 \\ 0 & 1\\ 1 & 1\end{array},\begin{array}{ccc} 0 & 1\\ 1 & 0\\ 0 & 0\end{array},\begin{array}{ccc} 1 & 1 \\ 0 & 0\\ 0 & 1\end{array},\begin{array}{ccc} 0 & 0 \\ 1 &1\\ 1 & 0\end{array}, \right]$

There is a lack of symmetry for me to complete....

7. ## Re: 3*2 Matrix with complex elements

One of the things you need to clarify is whether you are thinking of this as a vector space over the real numbers or over the complex numbers. For example, with the set of pairs of complex numbers, with the usual addition and scalar multiplication, over the real numbers, we can take (a+ bi, c+ di)= a(1, 0)+ b(i, 0)+ c(0, 1)+ d(0, i) so it has dimension 4. The same set over the complex numbers has (a+ bi, c+di)= (a+ bi)(1, 0)+ (c+di)(0, 1) and so the dimension is 2.

8. ## Re: 3*2 Matrix with complex elements

Originally Posted by HallsofIvy
One of the things you need to clarify is whether you are thinking of this as a vector space over the real numbers or over the complex numbers. For example, with the set of pairs of complex numbers, with the usual addition and scalar multiplication, over the real numbers, we can take (a+ bi, c+ di)= a(1, 0)+ b(i, 0)+ c(0, 1)+ d(0, i) so it has dimension 4. The same set over the complex numbers has (a+ bi, c+di)= (a+ bi)(1, 0)+ (c+di)(0, 1) and so the dimension is 2.
1) What is the significance of saying 'vector space over the real numbers' or 'vector space over the complex numbers'? You have written to different ways (RHS) of expressing the same LHS. I dont understand the difference.

2) Is the above an example for a 2*2 matrix?

3) How does one do the above for a 3*2?

9. ## Re: 3*2 Matrix with complex elements

the "underlying field" of a vector space can make a difference when talking about dimension.

i don't understand why you came up with those particular 4 3x2 matrices. why not the 6 matrices who have one entry 1, the rest 0?

10. ## Re: 3*2 Matrix with complex elements

Originally Posted by Deveno
you're not being asked to "solve" a system of linear equations, you're being asked to display a basis for a vector space.

here is a similar problem:

find the dimension of the vector space of all 2x2 complex matrices.

i claim:

$\left\{\begin{bmatrix}1&0\\0&0\end{bmatrix},\begin {bmatrix}0&1\\0&0\end{bmatrix}, \begin{bmatrix}0&0\\ 1&0 \end{bmatrix},\begin{bmatrix}0&0\\0&1\end{bmatrix} \right\}$

is a basis for this vector space. clearly this is a spaning set, since:

$\begin{bmatrix}a&b\\c&d\end{bmatrix} = a\begin{bmatrix}1&0\\0&0\end{bmatrix} + b\begin{bmatrix}0&1\\0&0\end{bmatrix} + c\begin{bmatrix}0&0\\1&0\end{bmatrix} + d\begin{bmatrix}0&0\\0&1\end{bmatrix}$

now, to show linear independence, suppose that:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = c_1\begin{bmatrix}1&0\\0&0\end{bmatrix} + c_2\begin{bmatrix}0&1\\0&0\end{bmatrix} + c_3\begin{bmatrix}0&0\\1&0\end{bmatrix} + c_4\begin{bmatrix}0&0\\0&1\end{bmatrix}$

then:

$\begin{bmatrix}0&0\\0&0\end{bmatrix} = \begin{bmatrix}c_1&c_2\\c_3&c_4\end{bmatrix}$

so $c_1 = c_2 = c_3 = c_4 = 0$ so our set is linearly independent, and is thus a basis.

since our basis has 4 elements, the dimension of the vector space is 4.
$\left[\begin{array}{ccc} 0 & 0 \\ 0 & 0\\0 & 0\end{array}\right]=c_1\left[ \begin{array}{ccc} 1 & 0 \\ 0 & 0\\0 & 0\end{array}\right]+c_2\left[ \begin{array}{ccc} 0 & 1\\ 0 & 0\\ 0 & 0\end{array}\right]+c_3\left[ \begin{array}{ccc} 0 & 0 \\ 1 & 0\\ 0 & 0\end{array}\right]+c_4\left[ \begin{array}{ccc} 0 & 0 \\ 0 & 1\\ 0 & 0\end{array}\right]+c_5\left[ \begin{array}{ccc} 0 & 0 \\ 0 & 0\\ 1 & 0\end{array}\right]+c_6\left[ \begin{array}{ccc} 0 & 0 \\ 0 & 0\\ 0& 1\end{array}\right]$

implies $c_1+c_2+c_3+c_4+c_5+c_6=0$

This implies the set is linearly independant with a dimension of 6? What is next?

My attempt based on HallsofIvy post

3*2 matrix over the real numbers
$\left[\begin{array}{ccc} a+bi & c+di \\ e+fi & g+hi\\j+ki & l+mi\end{array}\right]=a(1,0)+b(i,0)+c(1,0)+d(i,0)........$ Hence 12 dimensions

3*2 over the complex numbers

$\left[\begin{array}{ccc} a+bi & c+di \\ e+fi & g+hi\\j+ki & l+mi\end{array}\right]=(a+bi)(1,0)+(c+di)(0,1)+........$ Hence 6 dimensions.........?

11. ## Re: 3*2 Matrix with complex elements

Every element of the matrix is an ordered pair. If the matrix has only one non-zero element, all matrices with only this one element are a linear combination of two matrices, one with (0,1) as the sole element, and the other with (1,0) as the sole element. So for each element in the matrix you need two matrices with (1,0) and (0,1) as the sole elements. You need a total of 12 matrices, two for each element. The dimension of the vector space is 12.

12. ## Re: 3*2 Matrix with complex elements

Originally Posted by Hartlw
Every element of the matrix is an ordered pair. If the matrix has only one non-zero element, all matrices with only this one element are a linear combination of two matrices, one with (0,1) as the sole element, and the other with (1,0) as the sole element. So for each element in the matrix you need two matrices with (1,0) and (0,1) as the sole elements. You need a total of 12 matrices, two for each element. The dimension of the vector space is 12.
For both the real case and the complex case? Is this not conflicting with post # 7

13. ## Re: 3*2 Matrix with complex elements

Originally Posted by bugatti79
For both the real case and the complex case? Is this not conflicting with post # 7
For the real case, every base matrix has a 1 in one element and every other element a 0, for a total of six, the dimension is six. For complex case, see my previous post.

EDIT: I think post seven is discussing a complex vector space consisting of complex vectors a + bi. Not the same thing as a complex vector space each element of which is a matrix. You can probably think of each matrix as the sum of a real (a,0) at each location and imaginary, (,0,b) at each location, component . In any event, any complex matrix can be expressed as a linear combination of the 12 base matrices I described in my previous post.

EDIT: The matrices themselves satisfy requirements of linear vector space with the usual definition of matrix addition and multiplication by a scalar.

The base matrices are:

(0,1) (0,0)
(0,0) (0,0)
(0,0) (0,0)

(1,0) (0,0)
(0,0) (0,0)
(0,0) (0,0)

(0,0) (1,0)
(0,0) (0,0)
(0,0) (0,0)

..... for 12 base matrices (dim 12).

14. ## Re: 3*2 Matrix with complex elements

Originally Posted by Hartlw
I think post seven is discussing a complex vector space consisting of complex vectors a + bi.
So based on your post is this the answer to the following original question?

Given that the set of all 3*2 matrices with complex elements is a complex vector space, with the usual definitions of addition and scalr multiplication of matrices, what is its dimension?

3*2 matrix over the complex numbers

$\left[\begin{array}{ccc} a+bi & c+di \\ e+fi & g+hi\\j+ki & l+mi\end{array}\right]=a(1,0)+b(i,0)+c(1,0)+d(i,0)........$

15. ## Re: 3*2 Matrix with complex elements

No

If you denote the matrices in my previous post by E1, E2, E3 , E4, ...
Then an arbitrary complex matrix is expressed as a linear combination of E1, E2, E3,...,E12

(1,3) (5,3)
(3,5) (5,7) = 1xE1 + 3xE2 + 5xE3 + ..........
(3,3) (4,3)

Above is a matrix. The ordered pair (1,3) is just a std shortcut way of expressing 1+i3.

A complex matrix has to be expressed as a sum of complex matrices. Not as a sum of complex numbers. The addition of two complex matrices is a complex matrix by term by term addition, added just like complex numbers.

Page 1 of 3 123 Last


# Empty intersection and empty union

If $A_\alpha$ are subsets of a set $S$ then

$\bigcup_{\alpha \in I}A_\alpha$ = "all $x \in S$ so that $x$ is in at least one $A_\alpha$"

$\bigcap_{\alpha \in I} A_\alpha$ = "all $x \in S$ so that $x$ is in all $A_\alpha$"

It is the convention that $\bigcup_{\alpha \in \emptyset}A_\alpha = \emptyset$ and $\bigcap_{\alpha \in \emptyset} A_\alpha = S$.

But if $x$ is in $\bigcap_{\alpha \in \emptyset} A_\alpha = S$ then $x$ is in all $A_\alpha$ with $\alpha \in \emptyset$ and therefore $x$ is certainly in at least one $A_\alpha$ with $\alpha \in \emptyset$. But then $x \in \bigcup_{\alpha \in I}A_\alpha$.

Can someone help me and tell me what is wrong with this? Thank you.

-
This might help. math.stackexchange.com/q/309986/35983 –  Gautam Shenoy Apr 23 at 9:13
Element in the empty set is the problem. –  simplicity Apr 23 at 9:14
–  Martin Sleziak Apr 23 at 11:55

Some texts consider it a convention, but it is in fact a computation!

For the fixed set $S$, we are looking at the set $\mathcal P(S)$, the set of all subsets of $S$. With the operations of intersection and unions (of arbitrary many subsets) the set $\mathcal P(S)$ is what is known as a complete lattice (don't worry if you don't know what that means).

First, one can argue intuitively: the more subsets of $S$ you intersect, the smaller the intersection is. Or, the fewer subsets you intersect, the larger the intersection is. So, the intersection of no subsets at all, the least amount of sets you can intersect, should be the largest subset possible. Namely, $\bigcap_{i\in \emptyset}A_i=S$. Similarly, the fewer subsets you take the union of, the smaller the union. So, the union of no subsets at all should be the smallest set possible. Namely, $\bigcup _{i\in \emptyset }A_i=\emptyset$.

Now, to make things more formal, lets define the intersection and union in $\mathcal P(S)$. The definition will be equivalent to the set-theoretic definitions but will only make use of the partial order relation of inclusion. Given a collection $\{A_i\}_{i\in I}$ of subsets of $S$, their intersection is the largest subset of $S$ that is contained in each $A_i$ (notice that this is saying that the intersection is a greatest lower bound). Similarly, the union of the family of subsets is the smallest subset of $S$ that contains each $A_i$ (notice that this says that the union is a least upper bound). Incidentally, this point of view very clearly points to a duality between union and intersection.

So now, the intersection of no subsets is the largest subset of $S$ that is contained in each one of the given subsets. There are no given subsets at all, so (vacuously) any subset $B\subseteq S$ contains each of the non-existent $A_i$. The largest of those is $S$, proving that $\bigcap_{i\in \emptyset}A_i=S$. Similarly, the union of no subsets is the smallest subset of S that contains each of the given subsets. No subsets are given, so any subsets $B\subseteq S$ contains each of the non-existent $A_i$. The smallest of these is $\emptyset$, thus proving that $\bigcup_{i\in \emptyset}A_i=\emptyset$.

-
I realized, thank you. –  Anna Apr 23 at 9:37
You are welcome @Anna –  Ittay Weiss Apr 23 at 9:38
In the last paragraph: did you mean "...is contained in each of..."? –  Anna Apr 23 at 10:02
+1, excellent explanation. –  Andreas Caranti Apr 23 at 10:08

Please note that the fact that

$$\bigcap_{\alpha \in \emptyset} A_\alpha = S$$

is not a convention - it follows from the definition

$$\bigcap_{\alpha \in I} A_\alpha = \{ x \in S : \text{x \in A_\alpha, for all \alpha \in I}\}.$$

This is best understood by asking when is it that for a given $x \in S$ we have $x \notin \bigcap_{\alpha \in \emptyset} A_\alpha$. This can only happen if there exists $\alpha \in \emptyset$ such that $x \notin A_{\alpha}$. Since $\emptyset$ has no elements, there cannot be such an $\alpha$.

PS One can avoid introducing a (somewhat arbitrary) index set in an intersection, say. Instead, fix a set $S$, take a subset $\mathfrak{S}$ of $\mathcal{P}(S)$, and define $$\bigcap \mathfrak{S} = \{ x \in S : \text{x \in A for all A \in \mathfrak{S}} \}.$$ Then the argument above becomes $$\bigcap \emptyset = \{ x \in S : \text{x \in A for all A \in \emptyset} \} = \{ x \in S : \ \} = S,$$ since there are no $A$ to consider here.

-
It should be pointed out that this intersection is $S$ only if it is given that the computation is performed in $\mathcal P(S)$. Otherwise, if the computation is performed just in the ambient universe of sets, then the intersection does not exist (since it's trying to be a set that contains every other set). In contrast, the empty union is the empty set no matter where it is computed. –  Ittay Weiss Apr 23 at 9:47
@IttayWeiss, an excellent point. –  Andreas Caranti Apr 23 at 9:52
What is the ambient universe of sets? –  Anna Apr 23 at 10:06
–  Andreas Caranti Apr 23 at 10:07
Thank you Andreas. I think that my point of confusion is why you can write $\left\{ x \in S : x \in A \text{ for all } A \in \emptyset \right\} = \left\{ x \in S : \text{} \right\}$, whereas you cannot write (considering the case of the union of the empty collection) $\left\{ x \in S : x \in A \text{ for at least one } A \in \emptyset \right\} = \left\{ x \in S : \text{} \right\}$. Would you mind helping me understand the distinction? –  Dan Douglas Dec 12 at 15:59
show 2 more comments

Those conventions comes from the fact that $(\mathcal P (S), \cup, \emptyset)$ and $(\mathcal P (S), \cap, S)$ are monoids.

Hence, those conventions are just the usual $\sum_{k \in \emptyset} k = 0$ or $\prod_{k \in \emptyset} k = 1$ that you certainly know for $(\mathbb N, +)$ or $(\mathbb Z, \times)$ for example.

-
This is like saying "it's so because it is so". In fact, it is not a convention at all. It can be proven so by following the definition. In a monoid though, the unit is (by definition if you like) the result of applying the operation to no elements. But for $\mathcal P(S)$ it follows from a deeper reason than just saying it's so. –  Ittay Weiss Apr 23 at 9:34
@IttayWeiss The question was not "Is it a convention or not ?" but "Can anyone enlighten me about those conventions/properties ?". I was just pointing out that the OP was actually familiar with those but did not recognize it at first sight. Plus, I could argue that your proof can actually show that $\bigcap_\emptyset A_i = \emptyset$ : indeed, taking $B$ a subset of $S$, $\forall A_i \in \emptyset, A_i \not\subseteq B$ is as true as $\forall A_i \in \emptyset, A_i \subseteq B$, making $\emptyset$ the intersection over the emptyset. –  Pece Apr 23 at 19:16
I see your your points with the monoid analogy. If you'll think about it though, you'll see that your criticism of my proof is false (or are you claiming that you just proved a contradiction?) –  Ittay Weiss Apr 23 at 19:45
Sorry, I mixed up a little. What I was saying is : as $A_i \in \emptyset$ is universally false, your claim $\forall A_i, A_i \in \emptyset \implies B \subseteq A_i$ (and so $S$, the greatest of all, is the intersection) is a valid as my claim $\exists A_i, A_i \in \emptyset \implies B \not\subseteq A_i$ (and so no subset of $S$ is a lower bound of the $A_i$ except $\emptyset$). So in my opinion, you're making a convention on the complete lattices (the meet of nothing is the top) while I was making conventions about monoid. –  Pece Apr 24 at 8:34
I think you are still confused. I did not make use of any convention. I followed the definition. –  Ittay Weiss Apr 24 at 8:56
show 5 more comments


# How to prove that $\mathbb{Q}$ ( the rationals) is a countable set

I want to prove that $\mathbb{Q}$ is countable. So basically, I could find a bijection from $\mathbb{Q}$ to $\mathbb{N}$. But I have also recently proved that $\mathbb{Z}$ is countable, so is it equivalent to find a bijection from $\mathbb{Q}$ to $\mathbb{Z}$?

• Sure. Better yet, it's sufficient to find an injection from $\mathbb Q$ to $\mathbb Z$. Or for that matter a surjection from $\mathbb Z$ to $\mathbb Q$, or from $\mathbb N$ to $\mathbb Q$. – bof Feb 1 '14 at 8:25
• is just an injection sufficient to prove countability, though? – furashu Feb 1 '14 at 8:33
• I guess it depends on how you define "countable". Are finite sets countable? If not, then besides finding an injection from $\mathbb Q$ to $\mathbb Z$, you also have to prove that $\mathbb Q$ is infinite. But I you already know that. – bof Feb 1 '14 at 8:36
• i would say finite sets are not "countable" but "finite" .. seems weird, but countable is a term I would reserve specifically for distinction between cardinality of infinite sets. – furashu Feb 1 '14 at 8:40
• Fine. $\mathbb Q$ is an infinite set. An infinite set is countable if it has an injection into $\mathbb N$. Or into any countable set, such as $\mathbb Z$, which you already know is countable. – bof Feb 1 '14 at 8:46

Clearly $\mathbb{Z}$ injects into $\mathbb{Q}$.

Let $p_i$ enumerate all the prime numbers.

If $q \neq 0, 1, -1$, let $q = \pm \frac{p_{i_0}^{n_0} ... p_{i_k}^{n_k}}{p_{j_0}^{m_0} ... p_{j_p}^{m_p}}$ be the prime decomposition the numerator and denominator of $q$ written in simplest form. Define

$\Phi(q) = \begin{cases} 0 & \quad q = 0 \\ 1 & \quad q = 1 \\ -1 & \quad q = -1 \\ p_{2 i_0}^{n_0} ... p_{2 i_k}^{n_k} p_{2 j_0 + 1}^{m_0} ... p_{2 j_p + 1}^{m_p} & \quad q = \frac{p_{i_0}^{n_0} ... p_{i_k}^{n_k}}{p_{j_0}^{m_0} ... p_{j_p}^{m_p}} \\ - p_{2 i_0}^{n_0} ... p_{2 i_k}^{n_k} p_{2 j_0 + 1}^{m_0} ... p_{2 j_p + 1}^{m_p} & \quad q = - \frac{p_{i_0}^{n_0} ... p_{i_k}^{n_k}}{p_{j_0}^{m_0} ... p_{j_p}^{m_p}} \end{cases}$

$\Phi$ is an injection of $\mathbb{Q}$ into $\mathbb{Z}$.

By the Cantor Schroder Theorem, there is a bijection between $\mathbb{Z}$ and $\mathbb{Q}$.

As bof mentioned, a nicer injection would be

$\Phi(q) = \begin{cases} 0 & \quad q = 0 \\ 1 & \quad q = 1 \\ -1 & \quad q = -1 \\ 2^m (2n + 1) & \quad q = \frac{m}{n} \text{ simplest form } \\ - 2^m(2n + 1) & \quad q = - \frac{m}{n} \text{ simplest form} \end{cases}$

• this is one of the most impressive and elegant answers i've seen on here, well done! – furashu Feb 1 '14 at 9:18
• Instead of using prime factorizations, you could just map the reduced fraction $\frac mn$ to the integer $2^m(2n+1)$ – bof Feb 1 '14 at 9:23
• @bof True. This would have saved me like ten minutes of typing. – William Feb 1 '14 at 9:27
• @William can you explain what bof said? what's the significance of that integer? – furashu Feb 1 '14 at 9:39
• @William oh i am checking it now, I just like to know where things coem from, to get a glimpse on peoples intuition and knowledge. – furashu Feb 1 '14 at 9:46

If you know that $\mathbb{Z}$ is countable, you know there is a bijection $\chi:\mathbb{N} \rightarrow \mathbb{Z}$. Hence, it is sufficient to find a bijection $\nu:\mathbb{Z} \rightarrow \mathbb{Q}$ since then $\chi \circ \nu$ is a bijection between $\mathbb{N}$ and $\mathbb{Q}$.

In any case, the following figure illustrates a bijection between $\mathbb{Z}$ and $\mathbb{Q}$.

We follow the worm back and forth "counting" the rational numbers, skipping any numbers that are not simplified fractions.

Hint: There is a natural map $$\left\{ \begin{array}{ccc} \mathbb{Z} \times \mathbb{Z}_{>0} & \to & \mathbb{Q} \\ (a,b) & \mapsto & \frac{a}{b} \end{array} \right.$$

• Is mapping from Z x Z the same as mapping from Z, though? – furashu Feb 1 '14 at 8:44
• Lemma : If $A$ is countable, then $A \times A$ is countable. – Euler....IS_ALIVE Feb 1 '14 at 8:53
• @Euler....IS_ALIVE How does one prove that? – Arjang Jan 19 '17 at 12:23

I read this proof in Amer. Math. Monthly. Suffices to find out an injective function from the set of positive rationals to positive integers. Consider the representation of numbers in base 11, where the 11 digits used are $$0,1,2,3, ..., 9, /$$ (yes, it is a slash as digit for the number ten). Now the rational number $$7/83$$ represents the 4-digit base-11 positive integer: $$(7\times 11^3) + (10\times 11^2) + (8\times 11) + 3$$.

• I didn't understand this. Can you explain why we can give a completely different meaning to the slash (from its established definition as the division symbol to a numeral in base-11) so as to create an injection. – Mr Reality Jan 12 at 20:21
• Ok. Write out a rational number which has a division symbol slash, say for example 3/4. Now replace slash by x. (Remember x is roman numeral for ten). So this becomes 3x4 which is a 3-digit number in base 11 system. The value of this is three eleven squared plus ten elevens and 4 which in base 10 is $(3\times 121 + 10 \times 11 +4= 363+110+4=477$. SO the function sends $3/4$ to 477. – P Vanchinathan Jan 13 at 2:08

Consider for $n=2,3,4,\ldots$ the sets

$$A_n=\left\{\frac pq :(p,q)=1,p,q>0,p+q=n\right\}$$

Claim Each $A_n$ is finite, and $\Bbb Q^+=A_2\cup A_3\cup A_4\cup\dots$

A002487 Stern's diatomic series (or Stern-Brocot sequence) Also called fusc(n) [Dijkstra]. a(n)/a(n+1) runs through all the reduced nonnegative rationals exactly once [Stern; Calkin and Wilf]. https://www.cs.utexas.edu/users/EWD/transcriptions/EWD05xx/EWD570.html

fusc(1) = 1
fusc(2n) = fusc(n)
fusc(2n+1) = fusc(n) + fusc(n+1)

And it seems that fusc(k)/fusc(k+1) gives the positive rational numbers. There was also a contrieved proof recently that fusc does what it does here: https://www.isa-afp.org/browser_info/current/AFP/Stern_Brocot/document.pdf

Using the sign of Z we could create a mapping to the positive and negative rational numbers.


# Number of edges of a non-planar graph with fixed number of vertex

Consider a connected undirected simple non-planar graph $$G$$ with $$15$$ vertices. If removing any edge from $$G$$ results in a planar graph, how many edges does $$G$$ have?

It is obvious that if the number of edges greater than $$3*15-6=39$$, then it is not planar. But, how to discuss "removing any edge make it planar"? Thanks

The number of edges of $$G$$ is either $$18$$ or $$20$$.

Since graph $$G$$ is non-planar, by Kuratowski's theorem, it contains a subdivision of either $$K_5$$ (the complete graph of $$5$$ vertices) or $$K_{3,3}$$ (the complete bipartite graph of $$6$$ vertices) as a subgraph.

Since removing any edge from $$G$$ make it planar, above subgraph exhaust all edges of $$G$$. This means $$G$$ is a subdivision of either $$K_5$$ or $$K_{3,3}$$.

Notice subdividing a graph increases the number of vertices and edges by same amount.

If we start from $$K_5$$ which has $$5$$ vertices and $$10$$ edges, we need to subdivide $$10$$ times to get $$15$$ vertices. In this case, the resulting graph will have $$10 + 10 = 20$$ edges.

If we start from $$K_{3,3}$$ which has $$6$$ vertices and $$9$$ edges, we need to subdivide $$9$$ times to get $$15$$ vertices. In that case, the resulting graph will have $$9+9 = 18$$ edges.

• Got it! Thank you so much! Rarely use subdivision to count~~ – Andy Feb 25 '19 at 11:31

I am not sure if this is the answer you are looking for, but a discussion on this topic can conclude upper and lower bounds for the number of edges in such a graph.

As you have already stated, we can determine the upper limit using the Euler characteristic, $$v-e+f-c=1$$ which we can reduce to $$v-e+f=2$$ since our graph is connected. Because we know that our original graph $$G$$ is non-planar before removing an edge, we can say that $$\left|E\right|=e+1$$. We can use the maximum possible faces of a planer graph with $$v=15$$ to find $$e$$ using $$f_{max}=2v-4 = 26$$ $$15-e+26=2 \implies \left|E\right| \leq 40 \leftarrow\textrm{upper bound}$$

To find the lower bound, we can use Kuratowski's Theorem (see here for a nice explanation) to state a lower bound, $$\left|E\right| \geq v+3 = 18$$.

So, we can say that for a non-planar graph $$G$$, with $$\left|V\right|=15$$ and the property that removing an edge must make the result planar, has $$18\leq\left|E\right|\leq 40$$ edges.

Essentially, if the number of edges is less than the lower bound, we know that the graph must be planar. If the number of edges is greater than the upper bound, we would have to remove more than one edge to make it planar.

• Got it! Thank you so much. You gave a very detailed description. – Andy Feb 25 '19 at 11:35


# Expected number of steps in a 1D random walk with reflecting edges

Assume there is a row of $$k$$ tiles. A creature (monkey in some situations, ant in others, frog in others) lies on tile $$a$$. There is a 50% probability that the creature jumps to tile $$a-1$$ and a 50% probability that the creature jumps to tile $$a+1$$, unless it is on an edge tile. If it is on an edge tile, it must jump inwards, so it can't escape the system (i.e. tile 2 from tile 1 and tile $$k-1$$ from tile $$k$$). What is the expected number of steps for it to first reach tile $$b$$? $$1<=a, b<=k$$ is assumed. I feel like Markov chains might be used to get the answer, but I have a very limited understanding of them. If there is a closed form for the answer as well as a derivation for understanding, that would be perfect.

• Markov chains are the way! – Lord Shark the Unknown Jan 19 at 5:20
• @LordSharktheUnknown Can you elaborate in an answer how to use them in order to solve this problem? Like I said, I have a limited understanding of them. – automaticallyGenerated Jan 19 at 5:31
• I'have taken the liberty to modifiy your title and tags (3 tags are a good average) in order more readers are directed towards this interesting question and its interesting answer – Jean Marie Feb 15 at 12:27

Amazingly (to me) there happens to be a very simple expression for the expected number of steps to reach $$\ b\$$ from $$\ a\$$. For $$\ a < b\$$, it is: $$\left(\,b + a -2\,\right)\,\left(\,b-a\,\right)\ .$$ Although a Markov chain is the obvious way to model the process, and I'm sure it could used to derive the above result, there turns out to be a less cumbersome way of doing it.

For each $$\ i\$$ between $$\ 1\$$ and $$\ b\$$ inclusive, let $$\ e_i\$$ be the expected number of steps the creature takes to go from $$\ i\$$ to $$\ b\$$. Obviously, $$\ e_b\ = 0\$$.

If the creature starts from $$\ 1\$$, then it has to take one step to $$\ 2\$$, from which the expected number of steps to reach $$\ b\$$ is $$\ e_2\$$. Thus, the expected number of steps, $$\ e_1\$$, to reach $$\ b\$$ from $$\ 1\$$ is $$\ e_2 + 1\$$.

If the creature starts from $$\ b-1\$$, then with probability $$\ \frac{1}{2}\$$ it reaches $$\ b\$$ on the very next step—that is, in just a single step—, and with probability $$\ \frac{1}{2}\$$ it jumps to $$\ b-2\$$, from which the expected number of steps to reach $$\ b\$$ is $$\ e_{b-2}\$$. Thus $$\ e_{b-1} = \frac{1}{2}\left(e_{b-2} +1\right) + \frac{1}{2}\,1=\frac{1}{2}\,e_{b-2}+1\$$.

If the creature starts from any other point $$\ i\$$, with $$\ 2\le i\le b-2\$$, then with probability $$\ \frac{1}{2}\$$ it jumps to $$\ i-1\$$, from which the expected number of steps to reach $$\ b\$$ is $$\ e_{i-1}\$$, and with probability $$\ \frac{1}{2}\$$ it jumps to $$\ i+1\$$, from which the expected number of steps to reach $$\ b\$$ is $$\ e_{i+1}\$$. Therefore, $$\ e_i = \frac{1}{2}\left(e_{i-1} +1\right) + \frac{1}{2}\left(e_{i+1} +1\right)= \frac{1}{2}\,e_{i-1} + \frac{1}{2}\,e_{i+1} +1\$$.

Putting this all together, we have

$$\begin{eqnarray} e_1 &=& e_2 + 1\\ e_i &=& \frac{1}{2}\,e_{i-1} + \frac{1}{2}\,e_{i+1} +1, \ \ \mbox{for } i=2,3, \dots, b-2\ \mbox{, and}\\ e_{b-1} &=& \frac{1}{2}\,e_{b-2}+1\ , \end{eqnarray}$$ or, equivalently,

$$\begin{eqnarray} e_1 - e_2\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ &=& 1\\ \ \ \ \ \ \ \ \ \ \ \ \ \ -\frac{1}{2}\,e_{i-1} + e_i -\frac{1}{2}\,e_{i+1} &=& 1, \ \ \mbox{for } i=2,3, \dots, b-2\ \mbox{, and}\\ -\frac{1}{2}\,e_{b-2}+e_{b-1} &=& 1\ . \end{eqnarray}$$

These equations can be written as: $$M\,e = \mathbb 1\ ,$$ where $$\ M\$$ is the $$\ \left(\,b-1\,\right)\times\left(\,b-1\,\right)\$$ matrix, and $$\ \mathbb 1\$$ the $$\ \left(\,b-1\,\right)\times\,1\$$ column vector, whose entries are given by: $$\begin{eqnarray} M_{1,2} &=& -1\\ M_{i,i} &=& 1\ \ \mbox{for } i=1,2,\dots, b-1\\ M_{i,i-1} &=& -\frac{1}{2}\ \ \mbox{for } i=2,3,\dots, b-1\\ M_{i,i+1} &=& -\frac{1}{2}\ \ \mbox{for } i=2,3,\dots, b-2\\ M_{i,\,j} &=& 0 \ \ \mbox{for all other }\ i, j\\ \mathbb 1_i &=& 1\ \ \mbox{for } i=1,2,\dots, b-1\ . \end{eqnarray}$$ For $$\ b=6\$$, the matrix $$\ M\$$ looks like this: $$\left(\begin{matrix}1&-1&0&0&0 \\ -\frac{1}{2}&1&-\frac{1}{2}&0&0\\ 0&-\frac{1}{2}&1&-\frac{1}{2}&0\\ 0&0&-\frac{1}{2}&1&-\frac{1}{2}\\ 0&0&0&-\frac{1}{2}&1& \end{matrix}\right)\ ,$$ and has the following inverse: $$M^{-1} = \left(\begin{matrix} 5&8&6&4&2\\ 4&8&6&4&2\\ 3&6&6&4&2\\ 2&4&4&4&2\\ 1&2&2&2&2\\ \end{matrix}\right)\ .$$ From this, we can conjecture that the entries of the inverse of the $$\ \left(\,b-1\,\right)\times\left(\,b-1\,\right)\$$ matrix $$\ M\$$, defined above, should be the matrix $$\ L\$$ whose entries are given by: $$\begin{eqnarray} L_{i,1} &=& b-i\ \ \mbox{for } i=1,2,\dots, b-1\\ L_{1,\,j} &=& 2\,\left(b-j\right) \ \mbox{for } j=2,3,\dots, b-1\\ L_{i,\,j} &=& 2\,\min\left(b-i,b-j\right) \ \mbox{for } 2\le i\le b-1\ \ \mbox{and }\ 2\le j\le b-1\ , \end{eqnarray}$$ and on checking the product $$\ M\,L\$$, we find that it is indeed the $$\ \left(\,b-1\,\right)\times\left(\,b-1\,\right)\$$ identity matrix. So, finally, we have: $$e = M^{-1}\,\mathbb 1 = L\,\mathbb 1\ ,$$ and $$\ e_a\$$, the expected number of steps to get to $$\ b\$$ from $$\ a\$$ is the sum of the entries in the $$\ a^\mbox{th}\$$ row of $$\ L\$$: $$\begin{eqnarray} e_a &=& \left(b-a\right) + 2\,\left(\,a-1\,\right)\,\left(\,b-a\,\right) + 2\,\sum_{j=1}^{b-a-1} j\\ &=& \left(\,b + a -2\,\right)\,\left(\,b-a\,\right)\ , \end{eqnarray}$$ as stated above.

• Thanks for the clear answer. I think that this is just a disguised Markov chain, as your "M" is the identity matrix minus the transition matrix. – automaticallyGenerated Jan 21 at 14:30
• Not quite. The identity matrix minus the transition matrix is a singular $\ b\times b\$ matrix. $\ M\$ is the submatrix obtained from it by chopping off its last row and column. But you're right that there is indeed a Markov chain lurking in the shadows. – lonza leggiera Jan 21 at 23:27


Question

# $$\displaystyle \int_{0}^{1}\frac{dx}{(1+x^{2})\sqrt{(2+x^{2})}}=\frac{\pi }{k}$$. Find the value of $$k$$.

Solution

## Let $$\displaystyle I=\int { \frac { 1 }{ \left( { x }^{ 2 }+1 \right) \sqrt { { x }^{ 2 }+2 } } dx }$$Put $$x=\sqrt { 2 } \tan { t } \Rightarrow dx=\sqrt { 2 } \sec ^{ 2 }{ t } dt$$$$\displaystyle I=\sqrt { 2 } \int { \frac { sec{ t } }{ \sqrt { 2 } \left( 2\tan ^{ 2 }{ t } +1 \right) } dt } =\int { \frac { sec{ t } }{ 2\tan ^{ 2 }{ t } +1 } dt }$$Multiplying numerator and denominator by $$\cos ^{ 2 }{ t }$$, we get$$\displaystyle I=\int { \frac { \cos { t } }{ 2\sin ^{ 2 }{ t } +\cos ^{ 2 }{ t } } dt } =\int { \frac { \cos { t } }{ \sin ^{ 2 }{ t } +1 } dt }$$Now put $$u=\sin { t } \Rightarrow du=\cos { t } dt$$Therefore$$\displaystyle I=\int { \frac { 1 }{ { u }^{ 2 }+1 } du } =\tan ^{ -1 }{ u } =\tan ^{ -1 }{ \sin { t } }$$$$\displaystyle =\tan ^{ -1 }{ \sin { \left( \tan ^{ -1 }{ \left( \frac { x }{ \sqrt { 2 } } \right) } \right) } } =\tan ^{ -1 }{ \left( \frac { x }{ \sqrt { { x }^{ 2 }+2 } } \right) }$$Hence$$\displaystyle \int _{ 0 }^{ 1 }{ \frac { 1 }{ \left( { x }^{ 2 }+1 \right) \sqrt { { x }^{ 2 }+2 } } dx } ={ \left[ \tan ^{ -1 }{ \left( \frac { x }{ \sqrt { { x }^{ 2 }+2 } } \right) } \right] }_{ 0 }^{ 1 }$$$$\displaystyle =\frac { \pi }{ 6 } -0=\frac { \pi }{ 6 }$$$$\Rightarrow k=6$$Mathematics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


# how many cubes have at least $1,2,3$ colors on them

I have a painted cube, which is cut into $n^3$ smaller cubes. I now want to find the number of cubes which have $1$,$2$,$3$ sides painted. I know the long way round of taking each cube and putting them into different categories... but is there a short way or formula to do it?

$1$ face painted - You have to consider all the faces. There are $6$ faces, each with $(n-2)^2$ cubes with $1$ face painted . That gives you the formula $$6*(n-2)^2$$

$2$ faces painted - You have to take the edges. There are $12$ edges, each edge having $n-2$ cubes with $2$ faces painted . That gives you the formula $$12*(n-2)$$

$3$ faces painted - You have to take the corners alone. That gives you the formula $$8$$

Extra - $0$ faces painted - You have to consider the interior alone which gives $$(n-2)^3$$

• I think that you want $8$ corners. ;-) – Sammy Black Feb 23 '16 at 7:20
• @SammyBlack Thank you for that. Edited. – Win Vineeth Feb 23 '16 at 7:20
• saying side is not corrrect it is face which is painted – Bhaskara-III Feb 23 '16 at 13:17
• @Bhaskara-III The question asked for side, hence, I used side. – Win Vineeth Feb 23 '16 at 13:20
• oops you should have correctly mentioned that it should be a painted face not a painted side in your answer because it's very confusing term – Bhaskara-III Feb 23 '16 at 13:22

This is an addendum to Win Vineeth's excellent answer: the particular counts fall out of the algebraic expansion (using the Binomial Theorem) of $n^3$, where we write $n = (n-2) + 2$: $$\bigl( (n-2) + 2 \bigr)^3 = (n-2)^3 + 6(n-2)^2 + 12(n-2) + 8$$

This approach generalizes by letting $t$ be the "thickness" of the boundary (the part that gets painted). The original question uses $t=1$. The expansion now looks like: $$\bigl( (n-2t) + 2t \bigr)^3 = (n-2t)^3 + 6(n-2t)^2t + 12(n-2t)t^2 + 8t^3$$ Now, the power of $t$ serves as a placeholder for the number of sides that got painted. For example, if you want to know how many subcubes got painted on $2$ sides, then look at the coefficient of $t^2$, namely $12(n-2t)$, which is $12(n-2)$ once you set $t=1$. This is an example of a generating function, where a sequence is encoded as the list of coefficients of a polynomial (or often infinite series).

This approach also has the advantage of counting the number of boundary subhypercubes of a hypercube of any dimension: just expand $n^d$, where $d$ is the dimension.


Question

Let $$A$$ be a set containing $$n$$ elements. A subset $$P$$ of the set $$A$$ is chosen at random.The set $$A$$ is reconstructed by replacing the element of $$P$$, and another subsets $$Q$$ of $$A$$ is chosen at random. The probability that $$\left( P\cap Q \right)$$ contains exactly $$m(m<n)$$ elements is

A
3nm4n
B
nCm3m4n
C
nCm3nm4n
D
none of these

Solution

The correct option is C $$\displaystyle \frac { _{ }^{ n }{ { C }_{ m } }{ 3 }^{ n-m } }{ { 4 }^{ n } }$$We know that the number of subsets of a set containing $$n$$ elements is $${ 2 }^{ n }$$.Therefore, the number of ways of choosing $$P$$ and $$Q$$ is $$^{ { 2 }^{ n } }{ { C }_{ 1 } }\times _{ }^{ { 2 }^{ n } }{ { C }_{ 1 } }={ 2 }^{ n }\times { 2 }^{ n }={ 4 }^{ n }$$.Out of $$n$$ elements, $$m$$ elements can be chosen in $$^{ n }{ { C }_{ m } }$$ ways.If $$\left( P\cap Q \right)$$ contains exactly in elements, then from the remaining $$n-m$$ elements either an element belongs to $$P$$ or $$Q$$ but not both $$P$$ and $$Q$$.Suppose $$P$$ contains $$r$$ elements from the remaining $$n-m$$ elements.Then $$Q$$ may contain any number of elements from the remaining $$(n-m)-r$$ elements. Therefore, $$P$$ and $$Q$$ can be chosen in $$^{ n-m }{ { C }_{ r } }{ 2 }^{ \left( n-m \right) -r }$$But $$r$$ can vary from $$0$$ to $$(n-m)$$. So, $$P$$ and $$Q$$ can be chosen in general in$$\displaystyle \left( \sum _{ r=0 }^{ n-m }{ ^{ n-m }{ { C }_{ r } }{ 2 }^{ \left( n-m \right) -r } } \right) _{ }^{ n }{ { C }_{ m } }={ \left( 1+2 \right) }^{ n-m }\times _{ }^{ n }{ { C }_{ m } }=_{ }^{ n }{ { C }_{ m } }\times { 3 }^{ n-m }$$Hence, required probability $$\displaystyle =\dfrac { ^{ n }{ { C }_{ m } }\times { 3 }^{ n-m } }{ { 4 }^{ n } }$$Maths

Suggest Corrections

0

Similar questions
View More

People also searched for
View More


# Two Pumps, One Tank

• Jun 10th 2007, 04:04 AM
blueridge
Two Pumps, One Tank
Two pumps of different sizes working together can empty a fuel tank is 5 hours. The larger pump can empty this tank in 4 hours less than the smaller one. If the larger one is out of order, how long will it take the smaller one to do the job alone?
• Jun 10th 2007, 04:10 AM
Quick
Quote:

Originally Posted by blueridge
Two pumps of different sizes working together can empty a fuel tank is 5 hours. The larger pump can empty this tank in 4 hours less than the smaller one. If the larger one is out of order, how long will it take the smaller one to do the job alone?

I'll start you off...

Define your variables: I'd call the bigger pump $b$ and the smaller pump $s$

$b=$the number of tanks per hour the bigger pump can empty

$s=$the number of tanks per hour the smaller pump can empty

Both of those numbers will be fractions.

Now, since you only wanted a hint, I'm only going to give you the first equation and you'll have to find the rest...

Quote:

Two pumps of different sizes working together can empty a fuel tank is 5 hours.
$b+s=\frac{1\text{tank}}{5\text{hours}}$

Do you need any more help?
• Jun 10th 2007, 04:12 AM
blueridge
Yes
If you can set up the other equation, I can take it from there.
• Jun 10th 2007, 04:22 AM
Quick
Quote:

Originally Posted by blueridge
If you can set up the other equation, I can take it from there.

Quote:

Originally Posted by blueridge
Two pumps of different sizes working together can empty a fuel tank is 5 hours. The larger pump can empty this tank in 4 hours less than the smaller one. If the larger one is out of order, how long will it take the smaller one to do the job alone?

The next equation is somewhat weird.

If $b=\frac{\text{tanks}}{\text{hours}}$

than $\frac{1}{b}=\frac{\text{hours}}{\text{tanks}}$

So in fact:

$\frac{1}{b}=$the number of hours to empty a tank

So we know that: $\frac{1}{b}-\frac{1}{s}=4$
• Jun 10th 2007, 05:54 AM
blueridge
tell me...
I am dealing with two equations in two unknowns?
• Jun 10th 2007, 06:59 AM
CaptainBlack
Quote:

Originally Posted by blueridge
I am dealing with two equations in two unknowns?

Yes, solve for $b$ and $s$, and the required answer is $s$

RonL
• Jun 10th 2007, 07:39 AM
Soroban
Hello, blueridge!

Here's another approach . . .

Quote:

Two pumps of different sizes working together can empty a fuel tank is 5 hours.
The larger pump can empty this tank in 4 hours less than the smaller one.
If the larger one is out of order, how long will it take the smaller one to do the job alone?

Together, they can do the job in 5 hours.
. . In one hour, they can do $\frac{1}{5}$ of the job. .[1]

The smaller pump can do the job in $x$ hours. .[Note that: . $x > 4$.]
. . In one hour, it can do $\frac{1}{x}$ of the job.

The larger pump takes 4 hours less; it takes $x - 4$ hours.
. . In one hour, it can do $\frac{1}{x-4}$ of the job.
Together, in one hour, they can do: . $\frac{1}{x} + \frac{1}{x-4}$ of the job. .[2]

But [1] and [2] describe the same thing:
. . the fraction of the job done in one hour.

There is our equaton! . . . . $\boxed{\frac{1}{x} + \frac{1}{x-4} \:=\:\frac{1}{5}}$

Multiply by the common denominator: $5x(x - 4)$
. . $5(x - 4) + 5x \:=\:x(x-4)$

. . which simplifies to the quadratic: . $x^2 - 14x + 20 \:=\:0$

The Quadratic Formula gives us: . $x \;=\;\frac{14\pm\sqrt{116}}{2} \;=\;7 \pm\sqrt{29} \;\approx\;\{1.6,\:12.4\}$

Since $x > 4$. the solution is: . $x = 12.4$

Therefore, the smaller pump will take about 12.4 hours working alone.

• Jun 10th 2007, 11:14 AM
blueridge
tell me...
Soroban,

I thank you for sharing yet a more simplistic avenue to understanding this question.


# Math Help - Simple expression for trig matrix cubed

1. ## Simple expression for trig matrix cubed

Does anyone know how to determine a simple expression for $A^3$, where A is the following matrix?

cos@ sin@
-sin@ cos@

*I used @ as theta

I think I understand how to cube it (perform the multiplication twice?) but I have no idea how to simplify it. Thanks!

2. Originally Posted by jennifer1004
Does anyone know how to determine a simple expression for $A^3$, where A is the following matrix?

cos@ sin@
-sin@ cos@

*I used @ as theta

I think I understand how to cube it (perform the multiplication twice?) but I have no idea how to simplify it. Thanks!
A is the standard rotation matrix by angle @. A^3 = A.A.A => rotate by 3@. Therefore A^3 = .....

Originally Posted by jennifer1004
Does anyone know how to determine a simple expression for $A^3$, where A is the following matrix?

cos@ sin@
-sin@ cos@

*I used @ as theta

I think I understand how to cube it (perform the multiplication twice?) but I have no idea how to simplify it. Thanks!
Please see attached file

4. ## Thank you!

You have helped me so much. There is nothing in my text for linear algebra that looks anything like this matrix. I wasn't sure how to simplify the sines and cosines. Thanks again. Your work is very clear!

5. Hello, jennifer1004!

We are expected to know some basic identities:

. . $\begin{array}{cccccc}\cos^2\!x-\sin^2\!x \:=\:\cos2x & & \cos x\cos y - \sin x\sin y \:=\: \cos(x+y) \\
2\sin x\cos x \:=\: \sin2x & & \sin x\cos y + \cos x\sin y \:=\:\sin(x+y) \end{array}$

Given: . $A \:=\:\begin{bmatrix}\cos\theta & \sin\theta \\ \text{-}\sin\theta & \cos\theta \end{bmatrix}$

Find $A^3$

$A^2 \:=\:\begin{bmatrix}\cos\theta & \sin\theta \\ \text{-}\sin\theta & \cos\theta\end{bmatrix}\begin{bmatrix}\cos\theta & \sin\theta \\ \text{-}\sin\theta & \cos\theta \end{bmatrix}$ . $= \;\begin{bmatrix}\cos^2\!\theta-\sin^2\!\theta & 2\sin\theta\cos\theta \\ \text{-}2\sin\theta\cos\theta & \cos^2\!\theta -\sin^2\!\theta \end{bmatrix}$ . $= \;\begin{bmatrix}\cos2\theta & \sin2\theta \\ \text{-}\sin2\theta & \cos2\theta\end{bmatrix}$

$A^3 \;=\;\begin{bmatrix}\cos\theta & \sin\theta \\ \text{-}\sin\theta & \cos\theta \end{bmatrix}\begin{bmatrix}\cos2\theta & \sin2\theta \\ \text{-}\sin2\theta & \cos2\theta \end{bmatrix}$

. . $= \;\begin{bmatrix}\cos\theta\cos2\theta - \sin\theta\sin2\theta & \sin2\theta\cos\theta + \sin\theta\cos2\theta \\ \text{-}\sin\theta\cos2\theta - \sin2\theta\cos\theta & \cos\theta\cos2\theta - \sin\theta\sin2\theta \end{bmatrix}$

. . $= \;\begin{bmatrix}\cos3\theta & \sin3\theta \\ \text{-}\sin3\theta & \cos3\theta \end{bmatrix}$

6. ## Thanks Soroban!

Those identities are what I was looking for. I wasn't sure how to simplify. Thanks for sharing!


# Calculating Eigenvectors: Is my book wrong?

I have a covariance matrix: $$S= \begin{pmatrix} 16 & 10 \\ 10 & 25 \end{pmatrix}$$

I calculate my eigenvalues correctly (the same as what the book finds);

$\lambda_1 = 31.47$ , $\lambda_2 = 9.53$

But now it comes to calculating eigenvectors: I do everything as I was taught way back in Elementary Linear Algebra.

1. $S X = \lambda v$ {where v is the eigenvector}

2. $(S - I \lambda)v$

3. Get Row-Echelon Form

But when I do this I get the following reduced matrix:

$$\begin{pmatrix} 1 & -.646412 & 0 \\ 0 & 0 &0 \end{pmatrix}$$

But this result doesn't seem consistent with my textbook which says that the eigenvectors are;

$(0.54 , 0.84)^T$ and $(0.84 , -0.54)$

I looked online for calculators and found one consistent with the book and a few consistent with my result:

Consistent with Book: http://comnuan.com/cmnn01002/

Consistent with Me: http://www.arndt-bruenner.de/mathe/scripts/engl_eigenwert2.htm

Any ideas?

Additional Information:

• This problem stems from Principal Component Analysis
• $(0.54,0.84) = (9,14) \cdot 0.06,$ and $9/14 \approx 0.642857\ldots,$ so I wonder if you get $0.646412$ by rounding too early, before dividing. Maybe your reduced matrix should have been $\left[ \begin{array}{ccc} 1 & -0.642857\ldots & 0 \\ 0 & 0 & 0 \end{array} \right],$ which would be consistent with the answer being $(0.54,0.84). \qquad$ – Michael Hardy Nov 24 '17 at 19:10
• Specifically, how did you get $-0.646412\text{ ?} \qquad$ – Michael Hardy Nov 24 '17 at 19:12
• I answered your question in the answers section. You were right that I rounded early. – Nicklovn Nov 24 '17 at 19:15
• The textbook has normalized the eigenvectors so that the change-of-basis matrix is orthogonal. Remember, there’s no such thing as the eigenvector(s): any non-zero scalar multiple of an eigenvector is also an eigenvector. – amd Nov 25 '17 at 0:08

## 4 Answers

TLDR: The answers are the same.

The vectors $(0.646586,1)$ and $(0.54,0.84)$ go in (almost) the same direction (the only differences due to rounding and the magnitude of the vector). The first has the benefit of one of the entries equalling one. The second has the benefit that its magnitude is (almost) $1$, but they both give essentially the same information.

Remember that an eigenvector for a specific eigenvalue $\lambda$ is any vector such that $Av=\lambda v$ and these vectors collectively make up an entire subspace of your vector space, referred to as the eigenspace for the eigenvector $\lambda$. In the problem of determining eigenvalues and corresponding eigenvectors, you need only find some collection of eigenvectors such that they form a basis for each corresponding eigenspace. There are infinitely many correct choices for such eigenvectors.

Eigenvector is not unique.

Notice that non-zero scalar multiple of an eigenvector is still an eigenvector.

Both answers are correct.

Both answers are correct. The eigen vector you computed does not have unity norm. If you normalize your eigen vector then you will get the text-book answer.

$(0.54,0.84) = (9,14) \cdot 0.06,$ and $9/14 \approx 0.642857\ldots,$ so I wonder if you get $0.646412$ by rounding too early, before dividing. Maybe your reduced matrix should have been $\left[ \begin{array}{ccc} 1 & -0.642857\ldots & 0 \\ 0 & 0 & 0 \end{array} \right],$ which would be consistent with the answer being $(0.54,0.84).$

• Yes I admit that I rounded early. What happened is that I calculated the eigenvalues a few days ago but I lost that paper and just went with the eigenvalues listed in the book (theirs being rounded already). But I was informed that I had only to normalize the vector I had calculated to get the textbook answer. – Nicklovn Nov 24 '17 at 19:14
• @Nicklovn : This is one respect in which elementary arithmetic gets far less respect than it deserves. People round without knowing to what extent or in what way the bottom line will be affected, and then they write six or eight or ten digits in their bottom-line answer when the early rounding has the effect that only perhaps the first one or two are truthful and the rest of meaningless noise. – Michael Hardy Nov 24 '17 at 19:22
• I agree. I was doing well with it at first but when I got frustrated and lost my sheet I just relied on what the book gave me which was naturally rounded :( Thanks for your help! – Nicklovn Nov 25 '17 at 21:30
• @Nicklovn : I'm glad it helped. – Michael Hardy Nov 25 '17 at 23:19


# n distinguishable balls into n boxes

We have n distinguishable balls (say they have different labels or colours). If these balls are dropped at random in n boxes, what is the probability that:

1- No box is empty? 2- Exactly one box is empty?

For 1, I figured that we have $n^n$ ways to put the n balls into the n boxes. And I figured there are $n!$ to sort the balls so there is one ball for each box.

So is the answer to question 1 $n!/(n^n)$?

For 2, there are $n-1$ ways for the boxes to be empty. This is because you can have box 1 be empty (and just that), box 2 be empty and just that, so ultimately you can have at most $n-1$ variations of empty boxes.

So I figured the solution to part 2 was $\frac{n-1}{n^n}$

Is any of this right?

• I think your part two is incorrect, because for each box $n$ that is empty, there are $n-1$ boxes that could have the extra ball. Jan 26 '15 at 20:07
• That sounds right...I'll edit my answer. Jan 26 '15 at 20:12

For part 2, you must place the balls so that there is one empty box, one box with two balls, and the remaining balls will have one ball each. There are $n$ ways to pick the empty box, and $n-1$ ways to then pick the box with two balls.

We can now fill the $n$ spaces for the balls with the $n$ balls in any order you wish. There are of course $n!$ ways to do this. However, there is a caveat. If the box with two spaces is filled with ball $a$ and then ball $b$, that is the same as if we put ball $b$ and then ball $a$. So we are double counting, and the number of ways to fill in the boxes is $\frac{n!}{2}$.

Thus the total number of ways to have one empty box is $\frac{n(n-1)(n!)}{2}$, so the probability of having one empty box is $\frac{\frac{n(n-1)(n!)}{2}}{n^n} = \frac{(n-1)(n!)}{2n^{n-1}}$.

• It seems like order matters, so why would we divide by 1/2? Jan 26 '15 at 22:00
• Of the $n^n$ possibilities, all that matters is which box each ball goes into. When we consider the $n!$ ways to put $n$ boxes into the $n$ spaces, we have two spaces in one box. So by that counting, if we put ball $a$ into space 1 of that box, and ball $b$ into space 2 of that box, that's counted separately from putting ball $b$ into space 1 and ball $a$ into space 2. But in the $n^n$ counting it's just counted once, since both balls go into the same box. So we have to divide by 2 to match up the counting. Jan 27 '15 at 0:55
• See the answer I posted above from the textbook. Jan 27 '15 at 17:56
• Yes, the answer is the same: $\frac{n!}{2} = {n \choose 2} (n-2)!$. The book solution just picks the two balls in the one box first, then the remaining $n-2$ balls, whereas I picked all $n$ at once. Jan 27 '15 at 19:10

Here is the answer to the question, based on the answer manual (it was worded slightly differently in my textbook, hence why I did not find it). My part 1 was correct.

The textbook question is as follows -- I'm not sure the cells versus boxes thing is supposed to make it be any different.

>If $n$ balls are placed at random into $n$ cells, find the probability that exactly one cell remains empty.

First, we have $n$ ways of picking the empty box. Then we have $n-1$ ways of picking the box with two balls.

Now which two balls will go into the one box that will have two balls? There are ${n \choose 2}$ ways to pick the two distinct balls to go into this cell.

Lastly we need to arrange the remaining $n-2$ cells, and there are $(n-2)!$ ways to permutate all of these.

So we have:

$n(n-1){n \choose 2}(n-2)! = n!{n \choose 2}$

So the answer to part 2 is:

$\frac{n! {n \choose 2 }}{n^n}$

The argument in 1. is quite elegant. Another way to see this is that the probability to put the first ball in an empty box is $1$, for the second it is $(1 - 1/n)$, for the third it is $1 - 2/n$. The searched for probability is thus the product and this is exactly what you found in a different way that I actually like better.

For 2. you need to consider again all possibilities to place the balls. There are a lot more than you said. It is not just which box is empty (also there are $n$ ways for this) but also how the balls are distributed over the remaining ones.


# How to produce ListPlot that samples a given distribution?

I wanted to get a binned plot that a uniform background distribution with a spike at some bin. My first instinct was to use RandomVariate, and then ListPlot. What i get is this

This makes sense as the RandomVariate function is assigning a value to Y based on the distribution. But I was wondering how I would produce a plot that has a spike at some particular bin (some specified x). I would want to produce something that looks more like this, for example.

I know I could just manually enter the data, but is there a way to have a binned plot where there is a uniform background distribution and a gaussian peak at some specific x?

You are on the right track. Notice that in your mixture, the uniform distribution spans [0,2], but the Normal distribution has a mean of 3. Here is another mixture. Just adjust the distribution parameters as needed:

dist = MixtureDistribution[{1, 1},
{
UniformDistribution[{0, 100}],
NormalDistribution[50, 2]
}
];

Histogram[RandomVariate[dist, 1000], {1}]

Edit: If you want data, you can use some variant of HistogramList:

{binBoundaries, counts} =
HistogramList[RandomVariate[dist, 1000], {1}];

ListPlot[Transpose[{Most[binBoundaries], counts}], PlotRange -> All,
Filling -> Axis]

• Yes, but this is a Histogram. The actual data will still have values between 0 and a 100. I wanted a way where the data itself is spread that way. – shivangi Apr 10 at 3:38
• @shivangi, I understand. I edited my answer with a possibility. – David Keith Apr 10 at 4:17
• Thank you so much! This is exactly what I was trying to do. – shivangi Apr 13 at 0:51