text stringlengths 1 2.12k | source dict |
|---|---|
Proposition: $[\mathbb{R}:\mathbb{Q}]=\mathrm{dim}_\mathbb{Q}{}\mathbb{R}=|\mathbb{R}|$
Proof: Let $(q_n)_{n\in\mathbb{N_0}}$ be an enumeration of $\mathbb{Q}$. For $r\in\mathbb{R}$, take $$A_r:=\sum_{q_n<r}\frac{1}{n!}\;\;\;\;\text{ and }\;\;\;\;A:=\{A_r;\,r\in\mathbb{R}\};$$ the series is convergent because $\sum_{q_n<r}\frac{1}{n!}\leq\sum_{n=0}^\infty\frac{1}{n!}=\exp(1)<\infty$ (recall that $\exp(x)=\sum_{n=0}^\infty\frac{x^n}{n!}$ for any $x\in\mathbb{R}$).
To prove $|A|=|\mathbb{R}|$, assume $A_r=A_{s}$ and $r\neq s$. Without loss of generality $r<s$, hence $A_s=\sum_{q_n<s}\frac{1}{n!}=\sum_{q_n<r}\frac{1}{n!}+\sum_{r\leq q_n<s}\frac{1}{n!}=A_r+\sum_{r\leq q_n<s}\frac{1}{n!}$, so $\sum_{r\leq q_n<s}\frac{1}{n!}=0$, which is a contradiction, because each interval $(r,s)$ contains a rational number.
To prove $A$ is $\mathbb{Q}$-independent, assume $\alpha_1A_{r_1}+\cdots+\alpha_kA_{r_k}=0\;(1)$ with $\alpha_i\in\mathbb{Q}$. We can assume $r_1>\cdots>r_k$ (otherwise rearrange the summands) and $\alpha_i\in\mathbb{Z}$ (otherwise multiply by the common denominator). Choose $n$ large enough that $r_1>q_n>r_2\;(2)$; we'll increase $n$ two more times. The equality $n!\cdot(1)$ reads $n!(\alpha_1\sum_{q_m<r_1}\frac{1}{m!}+\cdots+\alpha_k\sum_{q_m<r_k}\frac{1}{m!})=0$. Rearranged (via $(2)$ when $m=n$), it reads
$$-\alpha_1\sum_{\substack{m<n\\q_m<r_1}}\frac{n!}{m!}-\cdots-\alpha_k\sum_{\substack{m<n\\q_m<r_k}}\frac{n!}{m!}-\alpha_1 =\alpha_1\sum_{\substack{m>n\\q_m<r_1}}\frac{n!}{m!}+\cdots+\alpha_k\sum_{\substack{m>n\\q_m<r_k}}\frac{n!}{m!}. \tag*{(3)}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9915543736828079,
"lm_q1q2_score": 0.8781517508596043,
"lm_q2_score": 0.8856314632529871,
"openwebmath_perplexity": 202.9308095561068,
"openwebmath_score": 0.9408407807350159,
"tags": null,
"url": "http://math.stackexchange.com/questions/6244/is-there-a-quick-proof-as-to-why-the-vector-space-of-mathbbr-over-mathbb/6250"
} |
The left hand side (LHS) of $(3)$ is an integer for any $n$. If $n$ is large enough that $(|\alpha_1|+\cdots+|\alpha_k|)\sum_{m=n+1}^\infty\frac{n!}{m!}<1$ holds (such $n$ can be found since $\sum_{m=n+1}^\infty\frac{n!}{m!}=\frac{1}{n+1}\sum_{m=n+1}^\infty\frac{1}{(n+2)\cdot\ldots\cdot m}\leq\frac{1}{n+1}\sum_{m=n+1}^\infty\frac{1}{(m-n-1)!}\leq\frac{1}{n+1}\exp(1)\rightarrow 0$ when $n\rightarrow\infty$), then the absolute value of RHS of $(3)$ is $<1$, and yet an integer, hence $\text{RHS}(3)=0$. Thus $(3)$ reads $\alpha_1=-\sum_{i=1}^{k}\sum_{m<n,q_m<r_i}\alpha_i\frac{n!}{m!}=0\;(\mathrm{mod}\,n)$. If moreover $n>|\alpha_1|$, this means that $\alpha_1=0$. Repeat this argument to conclude that also $\alpha_2=\cdots=\alpha_k=0$.
Since $A$ is a $\mathbb{Q}$-independent subset, by proposition 5.3 there exists a basis $B$ of $\mathbb{R}$ that contains $A$. Then $A\subseteq B\subseteq\mathbb{R}$ and $|A|=|\mathbb{R}|$ and Cantor-Bernstein theorem imply $|B|=|\mathbb{R}|$, therefore $[\mathbb{R}:\mathbb{Q}]=\mathrm{dim}_\mathbb{Q}{}\mathbb{R}=|\mathbb{R}|$. $\quad\blacksquare$
-
Is this uncountable linearly independent set basis ? – bhim sen Chaudhary Jun 5 '15 at 2:53
## protected by user26857Nov 25 '15 at 9:30
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead? | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9915543736828079,
"lm_q1q2_score": 0.8781517508596043,
"lm_q2_score": 0.8856314632529871,
"openwebmath_perplexity": 202.9308095561068,
"openwebmath_score": 0.9408407807350159,
"tags": null,
"url": "http://math.stackexchange.com/questions/6244/is-there-a-quick-proof-as-to-why-the-vector-space-of-mathbbr-over-mathbb/6250"
} |
# Iterating distributions
I want to calculate the distribution that comes from summing up random numbers between -0.5 and 0.5.
A computationally intensive version of doing this is to simply do the following:
SmoothHistogram[
Table[Table[
Sum[RandomReal[] - 0.5, {i, 1,
This won't work however if the number of numbers to be summed is very large, like a 1000000 for example.
So I tried doing it by first calculating the distribution of one random number, then calculating the distribution of two random numbers from the first distribution. The first distribution is simply:
UnitBox[x]
The next distribution can be calculated by integrating the previous distribution from x-0.5 to x+0.5:
Integrate[UnitBox[a], {a, x - 1/2, x + 1/2}]
I can't figure out how to iterate this to, for example, draw a plot from the result.
I also tried the following:
NestList[PDF[
ProbabilityDistribution[
Integrate[# /. x -> a, {a, x - 1/2, x + 1/2},
Assumptions -> x \[Element] Reals], {x, -2, 2}], x] &,
UnitBox[x], 5]
Plot[%, {x, -2, 2}]
• Any reason not to use built-ins? – ciao Apr 19 '15 at 3:26
• No. What built-in would help? – user Apr 19 '15 at 3:27
• maybe UniformSumDistribution. E.g., dis[n_] := UniformSumDistribution[n, {-.5, .5}]; Plot[Evaluate[PDF[dis@#, x] & /@ Range[10]], {x, -2, 2}]? – kglr Apr 19 '15 at 3:30
• It works! Thanks a lot. – user Apr 19 '15 at 3:32
• @MathematicaUser39386, posted the comment as an answer. – kglr Apr 19 '15 at 4:03
• summing random numbers between -0.5 and 0.5.
• the number of numbers to be summed is very large, like a 1000000 for example.
The sum of $n$ identical Uniform random variables is known as a generalised Irwin-Hall distribution, implemented in Mathematica as the UniformSumDistribution [ see kguler's answer]. The latter takes an $n$-part piecewise form, so, for example, if $n = 10$, the pdf is:
PDF[UniformSumDistribution[10, {-1/2, 1/2}], x] | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692311915196,
"lm_q1q2_score": 0.878144192866316,
"lm_q2_score": 0.8991213860551286,
"openwebmath_perplexity": 1805.8553106697436,
"openwebmath_score": 0.3286290168762207,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/80278/iterating-distributions"
} |
PDF[UniformSumDistribution[10, {-1/2, 1/2}], x]
The above is exact and works beautifully for small $n$. However, the OP poses the problem of $n$ being very large -- such as $n$ = 1 million -- which involves creating a 1 million part piecewise structure which is certainly going to fail. In fact, for $n = 1000$, simply making a plot of the pdf takes about 400 seconds on my Mac Pro:
(AA = Plot[
PDF[UniformSumDistribution[1000, {-1/2, 1/2}], x], {x, -50, 50},
PlotRange -> All]) // AbsoluteTiming
390 seconds
• For $n=10,000$, the above plot is simply unworkable ... which leaves the OP's question: how to proceed for large $n$??
Large $n$: apply Central Limit Theorem
For large $n$, I would suggest applying the (Lindeberg-Lévy) Central Limit Theorem:
• If the random variables $(X_1, X_2, \dots)$ are independent and identically distributed, each with finite mean $\mu$ and finite variance $\sigma^2$, then the sample sum:
$$S_n \overset{a}{\sim} N\left(n \mu,n \sigma ^2\right)$$
In our case, $X \sim \text{Uniform}(-\frac12,\frac12)$ so $\mu = 0$ and $\sigma^2 = \frac{1}{12}$, so the asymptotic distribution of the sample sum is:
$$S_n \overset{a}{\sim} N\left(0, \frac{n}{12} \right)$$
with pdf $f(x)$:
f = Exp[-6 (x^2/n)] / Sqrt[n Pi /6];
domain[f] = {x, -Infinity, Infinity} && {n > 0};
Here is a plot of pdf $f(x)$ when $n = 1000$:
BB = Plot[f /. n -> 1000, {x, -50, 50}, PlotRange -> All, PlotStyle -> Red]
This is, of course, instantaneous and works for arbitrarily large $n$. The following plot compares the exact solution AA to the asymptotic solution BB when $n = 1000$:
Show[BB, AA]
There is no discernible visual difference between the two plots here. Whereas the exact AA solution fails to evaluate for very large $n$, the asymptotic BB solution will always evaluate immediately, and with ever improving accuracy as $n$ increases.
The built-in function UniformSumDistribution may be useful: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692311915196,
"lm_q1q2_score": 0.878144192866316,
"lm_q2_score": 0.8991213860551286,
"openwebmath_perplexity": 1805.8553106697436,
"openwebmath_score": 0.3286290168762207,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/80278/iterating-distributions"
} |
The built-in function UniformSumDistribution may be useful:
usd[n_] := UniformSumDistribution[n, {-.5, .5}];
Plot[Evaluate[PDF[usd@#, x] & /@ Range[20]], {x, -2, 2},
PlotStyle -> (ColorData[{"Rainbow", {1, 20}}] /@ Range[20]),
Exclusions -> None, PlotRange -> All, ImageSize -> 500,
PlotLegends -> ("usd (" <> ToString[#] <> ")" & /@ Range[20])]
ClearAll[skd]
skd[n_] := SmoothKernelDistribution[RandomVariate[usd[n], 5000]];
Plot[Evaluate[PDF[#, x] & /@ {skd[5], usd[5], skd[3], usd[3]}], {x, -2, 2},
ImageSize -> 500, Exclusions -> None,
Filling -> {1 -> {{2}, {Orange, Yellow}}, 3 -> {{4}, {Blue, Green}}}] | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9766692311915196,
"lm_q1q2_score": 0.878144192866316,
"lm_q2_score": 0.8991213860551286,
"openwebmath_perplexity": 1805.8553106697436,
"openwebmath_score": 0.3286290168762207,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/80278/iterating-distributions"
} |
We are working to support a site-wide PDF but it is not yet available. You can download PDFs for individual lectures through the download badge on each lecture page.
Code should execute sequentially if run in a Jupyter notebook
# Linear Algebra¶
## Overview¶
Linear algebra is one of the most useful branches of applied mathematics for economists to invest in
For example, many applied problems in economics and finance require the solution of a linear system of equations, such as
$$\begin{array}{c} y_1 = a x_1 + b x_2 \\ y_2 = c x_1 + d x_2 \end{array}$$
or, more generally,
$$\begin{array}{c} y_1 = a_{11} x_1 + a_{12} x_2 + \cdots + a_{1k} x_k \\ \vdots \\ y_n = a_{n1} x_1 + a_{n2} x_2 + \cdots + a_{nk} x_k \end{array} \tag{1}$$
The objective here is to solve for the “unknowns” $x_1, \ldots, x_k$ given $a_{11}, \ldots, a_{nk}$ and $y_1, \ldots, y_n$
When considering such problems, it is essential that we first consider at least some of the following questions
• Does a solution actually exist?
• Are there in fact many solutions, and if so how should we interpret them?
• If no solution exists, is there a best “approximate” solution?
• If a solution exists, how should we compute it?
These are the kinds of topics addressed by linear algebra
In this lecture we will cover the basics of linear and matrix algebra, treating both theory and computation
We admit some overlap with this lecture, where operations on NumPy arrays were first explained
Note that this lecture is more theoretical than most, and contains background material that will be used in applications as we go along
## Vectors¶
A vector of length $n$ is just a sequence (or array, or tuple) of $n$ numbers, which we write as $x = (x_1, \ldots, x_n)$ or $x = [x_1, \ldots, x_n]$
We will write these sequences either horizontally or vertically as we please
(Later, when we wish to perform certain matrix operations, it will become necessary to distinguish between the two) | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
The set of all $n$-vectors is denoted by $\mathbb R^n$
For example, $\mathbb R ^2$ is the plane, and a vector in $\mathbb R^2$ is just a point in the plane
Traditionally, vectors are represented visually as arrows from the origin to the point
The following figure represents three vectors in this manner
In [1]:
import matplotlib.pyplot as plt
%matplotlib inline
fig, ax = plt.subplots(figsize=(10, 8))
# Set the axes through the origin
for spine in ['left', 'bottom']:
ax.spines[spine].set_position('zero')
for spine in ['right', 'top']:
ax.spines[spine].set_color('none')
ax.set(xlim=(-5, 5), ylim=(-5, 5))
ax.grid()
vecs = ((2, 4), (-3, 3), (-4, -3.5))
for v in vecs:
ax.annotate('', xy=v, xytext=(0, 0),
arrowprops=dict(facecolor='blue',
shrink=0,
alpha=0.7,
width=0.5))
ax.text(1.1 * v[0], 1.1 * v[1], str(v))
plt.show()
### Vector Operations¶
The two most common operators for vectors are addition and scalar multiplication, which we now describe
As a matter of definition, when we add two vectors, we add them element by element
$$x + y = \left[ \begin{array}{c} x_1 \\ x_2 \\ \vdots \\ x_n \end{array} \right] + \left[ \begin{array}{c} y_1 \\ y_2 \\ \vdots \\ y_n \end{array} \right] := \left[ \begin{array}{c} x_1 + y_1 \\ x_2 + y_2 \\ \vdots \\ x_n + y_n \end{array} \right]$$
Scalar multiplication is an operation that takes a number $\gamma$ and a vector $x$ and produces
$$\gamma x := \left[ \begin{array}{c} \gamma x_1 \\ \gamma x_2 \\ \vdots \\ \gamma x_n \end{array} \right]$$
Scalar multiplication is illustrated in the next figure
In [2]:
import numpy as np
fig, ax = plt.subplots(figsize=(10, 8))
# Set the axes through the origin
for spine in ['left', 'bottom']:
ax.spines[spine].set_position('zero')
for spine in ['right', 'top']:
ax.spines[spine].set_color('none') | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
ax.set(xlim=(-5, 5), ylim=(-5, 5))
x = (2, 2)
ax.annotate('', xy=x, xytext=(0, 0),
arrowprops=dict(facecolor='blue',
shrink=0,
alpha=1,
width=0.5))
ax.text(x[0] + 0.4, x[1] - 0.2, '$x$', fontsize='16')
scalars = (-2, 2)
x = np.array(x)
for s in scalars:
v = s * x
ax.annotate('', xy=v, xytext=(0, 0),
arrowprops=dict(facecolor='red',
shrink=0,
alpha=0.5,
width=0.5))
ax.text(v[0] + 0.4, v[1] - 0.2, f'${s} x$', fontsize='16')
plt.show()
In Python, a vector can be represented as a list or tuple, such as x = (2, 4, 6), but is more commonly represented as a NumPy array
One advantage of NumPy arrays is that scalar multiplication and addition have very natural syntax
In [3]:
x = np.ones(3) # Vector of three ones
y = np.array((2, 4, 6)) # Converts tuple (2, 4, 6) into array
x + y
Out[3]:
array([3., 5., 7.])
In [4]:
4 * x
Out[4]:
array([4., 4., 4.])
### Inner Product and Norm¶
The inner product of vectors $x,y \in \mathbb R ^n$ is defined as
$$x' y := \sum_{i=1}^n x_i y_i$$
Two vectors are called orthogonal if their inner product is zero
The norm of a vector $x$ represents its “length” (i.e., its distance from the zero vector) and is defined as
$$\| x \| := \sqrt{x' x} := \left( \sum_{i=1}^n x_i^2 \right)^{1/2}$$
The expression $\| x - y\|$ is thought of as the distance between $x$ and $y$
Continuing on from the previous example, the inner product and norm can be computed as follows
In [5]:
np.sum(x * y) # Inner product of x and y
Out[5]:
12.0
In [6]:
np.sqrt(np.sum(x**2)) # Norm of x, take one
Out[6]:
1.7320508075688772
In [7]:
np.linalg.norm(x) # Norm of x, take two
Out[7]:
1.7320508075688772
### Span¶
Given a set of vectors $A := \{a_1, \ldots, a_k\}$ in $\mathbb R ^n$, it’s natural to think about the new vectors we can create by performing linear operations
New vectors created in this manner are called linear combinations of $A$
In particular, $y \in \mathbb R ^n$ is a linear combination of $A := \{a_1, \ldots, a_k\}$ if | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
In particular, $y \in \mathbb R ^n$ is a linear combination of $A := \{a_1, \ldots, a_k\}$ if
$$y = \beta_1 a_1 + \cdots + \beta_k a_k \text{ for some scalars } \beta_1, \ldots, \beta_k$$
In this context, the values $\beta_1, \ldots, \beta_k$ are called the coefficients of the linear combination
The set of linear combinations of $A$ is called the span of $A$
The next figure shows the span of $A = \{a_1, a_2\}$ in $\mathbb R ^3$
The span is a 2 dimensional plane passing through these two points and the origin
In [8]:
from matplotlib import cm
from mpl_toolkits.mplot3d import Axes3D
from scipy.interpolate import interp2d
fig = plt.figure(figsize=(10, 8))
ax = fig.gca(projection='3d')
x_min, x_max = -5, 5
y_min, y_max = -5, 5
α, β = 0.2, 0.1
ax.set(xlim=(x_min, x_max), ylim=(x_min, x_max), zlim=(x_min, x_max),
xticks=(0,), yticks=(0,), zticks=(0,))
gs = 3
z = np.linspace(x_min, x_max, gs)
x = np.zeros(gs)
y = np.zeros(gs)
ax.plot(x, y, z, 'k-', lw=2, alpha=0.5)
ax.plot(z, x, y, 'k-', lw=2, alpha=0.5)
ax.plot(y, z, x, 'k-', lw=2, alpha=0.5)
# Fixed linear function, to generate a plane
def f(x, y):
return α * x + β * y
# Vector locations, by coordinate
x_coords = np.array((3, 3))
y_coords = np.array((4, -4))
z = f(x_coords, y_coords)
for i in (0, 1):
ax.text(x_coords[i], y_coords[i], z[i], f'$a_{i+1}$', fontsize=14)
# Lines to vectors
for i in (0, 1):
x = (0, x_coords[i])
y = (0, y_coords[i])
z = (0, f(x_coords[i], y_coords[i]))
ax.plot(x, y, z, 'b-', lw=1.5, alpha=0.6)
# Draw the plane
grid_size = 20
xr2 = np.linspace(x_min, x_max, grid_size)
yr2 = np.linspace(y_min, y_max, grid_size)
x2, y2 = np.meshgrid(xr2, yr2)
z2 = f(x2, y2)
ax.plot_surface(x2, y2, z2, rstride=1, cstride=1, cmap=cm.jet,
linewidth=0, antialiased=True, alpha=0.2)
plt.show()
#### Examples¶
If $A$ contains only one vector $a_1 \in \mathbb R ^2$, then its span is just the scalar multiples of $a_1$, which is the unique line passing through both $a_1$ and the origin | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
If $A = \{e_1, e_2, e_3\}$ consists of the canonical basis vectors of $\mathbb R ^3$, that is
$$e_1 := \left[ \begin{array}{c} 1 \\ 0 \\ 0 \end{array} \right] , \quad e_2 := \left[ \begin{array}{c} 0 \\ 1 \\ 0 \end{array} \right] , \quad e_3 := \left[ \begin{array}{c} 0 \\ 0 \\ 1 \end{array} \right]$$
then the span of $A$ is all of $\mathbb R ^3$, because, for any $x = (x_1, x_2, x_3) \in \mathbb R ^3$, we can write
$$x = x_1 e_1 + x_2 e_2 + x_3 e_3$$
Now consider $A_0 = \{e_1, e_2, e_1 + e_2\}$
If $y = (y_1, y_2, y_3)$ is any linear combination of these vectors, then $y_3 = 0$ (check it)
Hence $A_0$ fails to span all of $\mathbb R ^3$
### Linear Independence¶
As we’ll see, it’s often desirable to find families of vectors with relatively large span, so that many vectors can be described by linear operators on a few vectors
The condition we need for a set of vectors to have a large span is what’s called linear independence
In particular, a collection of vectors $A := \{a_1, \ldots, a_k\}$ in $\mathbb R ^n$ is said to be
• linearly dependent if some strict subset of $A$ has the same span as $A$
• linearly independent if it is not linearly dependent
Put differently, a set of vectors is linearly independent if no vector is redundant to the span, and linearly dependent otherwise
To illustrate the idea, recall the figure that showed the span of vectors $\{a_1, a_2\}$ in $\mathbb R ^3$ as a plane through the origin
If we take a third vector $a_3$ and form the set $\{a_1, a_2, a_3\}$, this set will be
• linearly dependent if $a_3$ lies in the plane
• linearly independent otherwise
As another illustration of the concept, since $\mathbb R ^n$ can be spanned by $n$ vectors (see the discussion of canonical basis vectors above), any collection of $m > n$ vectors in $\mathbb R ^n$ must be linearly dependent
The following statements are equivalent to linear independence of $A := \{a_1, \ldots, a_k\} \subset \mathbb R ^n$ | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
1. No vector in $A$ can be formed as a linear combination of the other elements
2. If $\beta_1 a_1 + \cdots \beta_k a_k = 0$ for scalars $\beta_1, \ldots, \beta_k$, then $\beta_1 = \cdots = \beta_k = 0$
(The zero in the first expression is the origin of $\mathbb R ^n$)
### Unique Representations¶
Another nice thing about sets of linearly independent vectors is that each element in the span has a unique representation as a linear combination of these vectors
In other words, if $A := \{a_1, \ldots, a_k\} \subset \mathbb R ^n$ is linearly independent and
$$y = \beta_1 a_1 + \cdots \beta_k a_k$$
then no other coefficient sequence $\gamma_1, \ldots, \gamma_k$ will produce the same vector $y$
Indeed, if we also have $y = \gamma_1 a_1 + \cdots \gamma_k a_k$, then
$$(\beta_1 - \gamma_1) a_1 + \cdots + (\beta_k - \gamma_k) a_k = 0$$
Linear independence now implies $\gamma_i = \beta_i$ for all $i$
## Matrices¶
Matrices are a neat way of organizing data for use in linear operations
An $n \times k$ matrix is a rectangular array $A$ of numbers with $n$ rows and $k$ columns:
$$A = \left[ \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{1k} \\ a_{21} & a_{22} & \cdots & a_{2k} \\ \vdots & \vdots & & \vdots \\ a_{n1} & a_{n2} & \cdots & a_{nk} \end{array} \right]$$
Often, the numbers in the matrix represent coefficients in a system of linear equations, as discussed at the start of this lecture
For obvious reasons, the matrix $A$ is also called a vector if either $n = 1$ or $k = 1$
In the former case, $A$ is called a row vector, while in the latter it is called a column vector
If $n = k$, then $A$ is called square
The matrix formed by replacing $a_{ij}$ by $a_{ji}$ for every $i$ and $j$ is called the transpose of $A$, and denoted $A'$ or $A^{\top}$
If $A = A'$, then $A$ is called symmetric
For a square matrix $A$, the $i$ elements of the form $a_{ii}$ for $i=1,\ldots,n$ are called the principal diagonal | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
$A$ is called diagonal if the only nonzero entries are on the principal diagonal
If, in addition to being diagonal, each element along the principal diagonal is equal to 1, then $A$ is called the identity matrix, and denoted by $I$
### Matrix Operations¶
Just as was the case for vectors, a number of algebraic operations are defined for matrices
Scalar multiplication and addition are immediate generalizations of the vector case:
$$\gamma A = \gamma \left[ \begin{array}{ccc} a_{11} & \cdots & a_{1k} \\ \vdots & \vdots & \vdots \\ a_{n1} & \cdots & a_{nk} \\ \end{array} \right] := \left[ \begin{array}{ccc} \gamma a_{11} & \cdots & \gamma a_{1k} \\ \vdots & \vdots & \vdots \\ \gamma a_{n1} & \cdots & \gamma a_{nk} \\ \end{array} \right]$$
and
$$A + B = \left[ \begin{array}{ccc} a_{11} & \cdots & a_{1k} \\ \vdots & \vdots & \vdots \\ a_{n1} & \cdots & a_{nk} \\ \end{array} \right] + \left[ \begin{array}{ccc} b_{11} & \cdots & b_{1k} \\ \vdots & \vdots & \vdots \\ b_{n1} & \cdots & b_{nk} \\ \end{array} \right] := \left[ \begin{array}{ccc} a_{11} + b_{11} & \cdots & a_{1k} + b_{1k} \\ \vdots & \vdots & \vdots \\ a_{n1} + b_{n1} & \cdots & a_{nk} + b_{nk} \\ \end{array} \right]$$
In the latter case, the matrices must have the same shape in order for the definition to make sense
We also have a convention for multiplying two matrices
The rule for matrix multiplication generalizes the idea of inner products discussed above, and is designed to make multiplication play well with basic linear operations
If $A$ and $B$ are two matrices, then their product $A B$ is formed by taking as its $i,j$-th element the inner product of the $i$-th row of $A$ and the $j$-th column of $B$
If $A$ is $n \times k$ and $B$ is $j \times m$, then to multiply $A$ and $B$ we require $k = j$, and the resulting matrix $A B$ is $n \times m$
As perhaps the most important special case, consider multiplying $n \times k$ matrix $A$ and $k \times 1$ column vector $x$ | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
According to the preceding rule, this gives us an $n \times 1$ column vector
$$A x = \left[ \begin{array}{ccc} a_{11} & \cdots & a_{1k} \\ \vdots & \vdots & \vdots \\ a_{n1} & \cdots & a_{nk} \end{array} \right] \left[ \begin{array}{c} x_{1} \\ \vdots \\ x_{k} \end{array} \right] := \left[ \begin{array}{c} a_{11} x_1 + \cdots + a_{1k} x_k \\ \vdots \\ a_{n1} x_1 + \cdots + a_{nk} x_k \end{array} \right] \tag{2}$$
Note
$A B$ and $B A$ are not generally the same thing
Another important special case is the identity matrix
You should check that if $A$ is $n \times k$ and $I$ is the $k \times k$ identity matrix, then $AI = A$
If $I$ is the $n \times n$ identity matrix, then $IA = A$
### Matrices in NumPy¶
NumPy arrays are also used as matrices, and have fast, efficient functions and methods for all the standard matrix operations [1]
You can create them manually from tuples of tuples (or lists of lists) as follows
In [9]:
A = ((1, 2),
(3, 4))
type(A)
Out[9]:
tuple
In [10]:
A = np.array(A)
type(A)
Out[10]:
numpy.ndarray
In [11]:
A.shape
Out[11]:
(2, 2)
The shape attribute is a tuple giving the number of rows and columns — see here for more discussion
To get the transpose of A, use A.transpose() or, more simply, A.T
There are many convenient functions for creating common matrices (matrices of zeros, ones, etc.) — see here
Since operations are performed elementwise by default, scalar multiplication and addition have very natural syntax
In [12]:
A = np.identity(3)
B = np.ones((3, 3))
2 * A
Out[12]:
array([[2., 0., 0.],
[0., 2., 0.],
[0., 0., 2.]])
In [13]:
A + B
Out[13]:
array([[2., 1., 1.],
[1., 2., 1.],
[1., 1., 2.]])
To multiply matrices we use the @ symbol
In particular, A @ B is matrix multiplication, whereas A * B is element by element multiplication
See here for more discussion
### Matrices as Maps¶
Each $n \times k$ matrix $A$ can be identified with a function $f(x) = Ax$ that maps $x \in \mathbb R ^k$ into $y = Ax \in \mathbb R ^n$ | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
These kinds of functions have a special property: they are linear
A function $f \colon \mathbb R ^k \to \mathbb R ^n$ is called linear if, for all $x, y \in \mathbb R ^k$ and all scalars $\alpha, \beta$, we have
$$f(\alpha x + \beta y) = \alpha f(x) + \beta f(y)$$
You can check that this holds for the function $f(x) = A x + b$ when $b$ is the zero vector, and fails when $b$ is nonzero
In fact, it’s known that $f$ is linear if and only if there exists a matrix $A$ such that $f(x) = Ax$ for all $x$
## Solving Systems of Equations¶
Recall again the system of equations (1)
If we compare (1) and (2), we see that (1) can now be written more conveniently as
$$y = Ax \tag{3}$$
The problem we face is to determine a vector $x \in \mathbb R ^k$ that solves (3), taking $y$ and $A$ as given
This is a special case of a more general problem: Find an $x$ such that $y = f(x)$
Given an arbitrary function $f$ and a $y$, is there always an $x$ such that $y = f(x)$?
If so, is it always unique?
The answer to both these questions is negative, as the next figure shows
In [14]:
def f(x):
return 0.6 * np.cos(4 * x) + 1.4
xmin, xmax = -1, 1
x = np.linspace(xmin, xmax, 160)
y = f(x)
ya, yb = np.min(y), np.max(y)
fig, axes = plt.subplots(2, 1, figsize=(10, 10))
for ax in axes:
# Set the axes through the origin
for spine in ['left', 'bottom']:
ax.spines[spine].set_position('zero')
for spine in ['right', 'top']:
ax.spines[spine].set_color('none')
ax.set(ylim=(-0.6, 3.2), xlim=(xmin, xmax),
yticks=(), xticks=())
ax.plot(x, y, 'k-', lw=2, label='$f$')
ax.fill_between(x, ya, yb, facecolor='blue', alpha=0.05)
ax.vlines([0], ya, yb, lw=3, color='blue', label='range of $f$')
ax.text(0.04, -0.3, '$0$', fontsize=16)
ax = axes[0] | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
ax = axes[0]
ax.legend(loc='upper right', frameon=False)
ybar = 1.5
ax.plot(x, x * 0 + ybar, 'k--', alpha=0.5)
ax.text(0.05, 0.8 * ybar, '$y$', fontsize=16)
for i, z in enumerate((-0.35, 0.35)):
ax.vlines(z, 0, f(z), linestyle='--', alpha=0.5)
ax.text(z, -0.2, f'$x_{i}$', fontsize=16)
ax = axes[1]
ybar = 2.6
ax.plot(x, x * 0 + ybar, 'k--', alpha=0.5)
ax.text(0.04, 0.91 * ybar, '$y$', fontsize=16)
plt.show()
In the first plot there are multiple solutions, as the function is not one-to-one, while in the second there are no solutions, since $y$ lies outside the range of $f$
Can we impose conditions on $A$ in (3) that rule out these problems?
In this context, the most important thing to recognize about the expression $Ax$ is that it corresponds to a linear combination of the columns of $A$
In particular, if $a_1, \ldots, a_k$ are the columns of $A$, then
$$Ax = x_1 a_1 + \cdots + x_k a_k$$
Hence the range of $f(x) = Ax$ is exactly the span of the columns of $A$
We want the range to be large, so that it contains arbitrary $y$
As you might recall, the condition that we want for the span to be large is linear independence
A happy fact is that linear independence of the columns of $A$ also gives us uniqueness
Indeed, it follows from our earlier discussion that if $\{a_1, \ldots, a_k\}$ are linearly independent and $y = Ax = x_1 a_1 + \cdots + x_k a_k$, then no $z \not= x$ satisfies $y = Az$
### The $n \times n$ Case¶
Let’s discuss some more details, starting with the case where $A$ is $n \times n$
This is the familiar case where the number of unknowns equals the number of equations
For arbitrary $y \in \mathbb R ^n$, we hope to find a unique $x \in \mathbb R ^n$ such that $y = Ax$
In view of the observations immediately above, if the columns of $A$ are linearly independent, then their span, and hence the range of $f(x) = Ax$, is all of $\mathbb R ^n$
Hence there always exists an $x$ such that $y = Ax$
Moreover, the solution is unique | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
Hence there always exists an $x$ such that $y = Ax$
Moreover, the solution is unique
In particular, the following are equivalent
1. The columns of $A$ are linearly independent
2. For any $y \in \mathbb R ^n$, the equation $y = Ax$ has a unique solution
The property of having linearly independent columns is sometimes expressed as having full column rank
#### Inverse Matrices¶
Can we give some sort of expression for the solution?
If $y$ and $A$ are scalar with $A \not= 0$, then the solution is $x = A^{-1} y$
A similar expression is available in the matrix case
In particular, if square matrix $A$ has full column rank, then it possesses a multiplicative inverse matrix $A^{-1}$, with the property that $A A^{-1} = A^{-1} A = I$
As a consequence, if we pre-multiply both sides of $y = Ax$ by $A^{-1}$, we get $x = A^{-1} y$
This is the solution that we’re looking for
#### Determinants¶
Another quick comment about square matrices is that to every such matrix we assign a unique number called the determinant of the matrix — you can find the expression for it here
If the determinant of $A$ is not zero, then we say that $A$ is nonsingular
Perhaps the most important fact about determinants is that $A$ is nonsingular if and only if $A$ is of full column rank
This gives us a useful one-number summary of whether or not a square matrix can be inverted
### More Rows than Columns¶
This is the $n \times k$ case with $n > k$
This case is very important in many settings, not least in the setting of linear regression (where $n$ is the number of observations, and $k$ is the number of explanatory variables)
Given arbitrary $y \in \mathbb R ^n$, we seek an $x \in \mathbb R ^k$ such that $y = Ax$
In this setting, existence of a solution is highly unlikely
Without much loss of generality, let’s go over the intuition focusing on the case where the columns of $A$ are linearly independent | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
It follows that the span of the columns of $A$ is a $k$-dimensional subspace of $\mathbb R ^n$
This span is very “unlikely” to contain arbitrary $y \in \mathbb R ^n$
To see why, recall the figure above, where $k=2$ and $n=3$
Imagine an arbitrarily chosen $y \in \mathbb R ^3$, located somewhere in that three dimensional space
What’s the likelihood that $y$ lies in the span of $\{a_1, a_2\}$ (i.e., the two dimensional plane through these points)?
In a sense it must be very small, since this plane has zero “thickness”
As a result, in the $n > k$ case we usually give up on existence
However, we can still seek a best approximation, for example an $x$ that makes the distance $\| y - Ax\|$ as small as possible
To solve this problem, one can use either calculus or the theory of orthogonal projections
The solution is known to be $\hat x = (A'A)^{-1}A'y$ — see for example chapter 3 of these notes
### More Columns than Rows¶
This is the $n \times k$ case with $n < k$, so there are fewer equations than unknowns
In this case there are either no solutions or infinitely many — in other words, uniqueness never holds
For example, consider the case where $k=3$ and $n=2$
Thus, the columns of $A$ consists of 3 vectors in $\mathbb R ^2$
This set can never be linearly independent, since it is possible to find two vectors that span $\mathbb R ^2$
(For example, use the canonical basis vectors)
It follows that one column is a linear combination of the other two
For example, let’s say that $a_1 = \alpha a_2 + \beta a_3$
Then if $y = Ax = x_1 a_1 + x_2 a_2 + x_3 a_3$, we can also write
$$y = x_1 (\alpha a_2 + \beta a_3) + x_2 a_2 + x_3 a_3 = (x_1 \alpha + x_2) a_2 + (x_1 \beta + x_3) a_3$$
In other words, uniqueness fails
### Linear Equations with SciPy¶
Here’s an illustration of how to solve linear equations with SciPy’s linalg submodule
All of these routines are Python front ends to time-tested and highly optimized FORTRAN code | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
All of these routines are Python front ends to time-tested and highly optimized FORTRAN code
In [15]:
from scipy.linalg import inv, solve, det
A = ((1, 2), (3, 4))
A = np.array(A)
y = np.ones((2, 1)) # Column vector
det(A) # Check that A is nonsingular, and hence invertible
Out[15]:
-2.0
In [16]:
A_inv = inv(A) # Compute the inverse
A_inv
Out[16]:
array([[-2. , 1. ],
[ 1.5, -0.5]])
In [17]:
x = A_inv @ y # Solution
A @ x # Should equal y
Out[17]:
array([[1.],
[1.]])
In [18]:
solve(A, y) # Produces same solution
Out[18]:
array([[-1.],
[ 1.]])
Observe how we can solve for $x = A^{-1} y$ by either via inv(A) @ y, or using solve(A, y)
The latter method uses a different algorithm (LU decomposition) that is numerically more stable, and hence should almost always be preferred
To obtain the least squares solution $\hat x = (A'A)^{-1}A'y$, use scipy.linalg.lstsq(A, y)
## Eigenvalues and Eigenvectors¶
Let $A$ be an $n \times n$ square matrix
If $\lambda$ is scalar and $v$ is a non-zero vector in $\mathbb R ^n$ such that
$$A v = \lambda v$$
then we say that $\lambda$ is an eigenvalue of $A$, and $v$ is an eigenvector
Thus, an eigenvector of $A$ is a vector such that when the map $f(x) = Ax$ is applied, $v$ is merely scaled
The next figure shows two eigenvectors (blue arrows) and their images under $A$ (red arrows)
As expected, the image $Av$ of each $v$ is just a scaled version of the original
In [19]:
from scipy.linalg import eig
A = ((1, 2),
(2, 1))
A = np.array(A)
evals, evecs = eig(A)
evecs = evecs[:, 0], evecs[:, 1]
fig, ax = plt.subplots(figsize=(10, 8))
# Set the axes through the origin
for spine in ['left', 'bottom']:
ax.spines[spine].set_position('zero')
for spine in ['right', 'top']:
ax.spines[spine].set_color('none')
ax.grid(alpha=0.4)
xmin, xmax = -3, 3
ymin, ymax = -3, 3
ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax)) | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
xmin, xmax = -3, 3
ymin, ymax = -3, 3
ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
# Plot each eigenvector
for v in evecs:
ax.annotate('', xy=v, xytext=(0, 0),
arrowprops=dict(facecolor='blue',
shrink=0,
alpha=0.6,
width=0.5))
# Plot the image of each eigenvector
for v in evecs:
v = A @ v
ax.annotate('', xy=v, xytext=(0, 0),
arrowprops=dict(facecolor='red',
shrink=0,
alpha=0.6,
width=0.5))
# Plot the lines they run through
x = np.linspace(xmin, xmax, 3)
for v in evecs:
a = v[1] / v[0]
ax.plot(x, a * x, 'b-', lw=0.4)
plt.show()
The eigenvalue equation is equivalent to $(A - \lambda I) v = 0$, and this has a nonzero solution $v$ only when the columns of $A - \lambda I$ are linearly dependent
This in turn is equivalent to stating that the determinant is zero
Hence to find all eigenvalues, we can look for $\lambda$ such that the determinant of $A - \lambda I$ is zero
This problem can be expressed as one of solving for the roots of a polynomial in $\lambda$ of degree $n$
This in turn implies the existence of $n$ solutions in the complex plane, although some might be repeated
Some nice facts about the eigenvalues of a square matrix $A$ are as follows
1. The determinant of $A$ equals the product of the eigenvalues
2. The trace of $A$ (the sum of the elements on the principal diagonal) equals the sum of the eigenvalues
3. If $A$ is symmetric, then all of its eigenvalues are real
4. If $A$ is invertible and $\lambda_1, \ldots, \lambda_n$ are its eigenvalues, then the eigenvalues of $A^{-1}$ are $1/\lambda_1, \ldots, 1/\lambda_n$
A corollary of the first statement is that a matrix is invertible if and only if all its eigenvalues are nonzero
Using SciPy, we can solve for the eigenvalues and eigenvectors of a matrix as follows
In [20]:
A = ((1, 2),
(2, 1))
A = np.array(A)
evals, evecs = eig(A)
evals
Out[20]:
array([ 3.+0.j, -1.+0.j])
In [21]:
evecs
Out[21]:
array([[ 0.70710678, -0.70710678],
[ 0.70710678, 0.70710678]]) | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
Note that the columns of evecs are the eigenvectors
Since any scalar multiple of an eigenvector is an eigenvector with the same eigenvalue (check it), the eig routine normalizes the length of each eigenvector to one
### Generalized Eigenvalues¶
It is sometimes useful to consider the generalized eigenvalue problem, which, for given matrices $A$ and $B$, seeks generalized eigenvalues $\lambda$ and eigenvectors $v$ such that
$$A v = \lambda B v$$
This can be solved in SciPy via scipy.linalg.eig(A, B)
Of course, if $B$ is square and invertible, then we can treat the generalized eigenvalue problem as an ordinary eigenvalue problem $B^{-1} A v = \lambda v$, but this is not always the case
## Further Topics¶
We round out our discussion by briefly mentioning several other important topics
### Series Expansions¶
Recall the usual summation formula for a geometric progression, which states that if $|a| < 1$, then $\sum_{k=0}^{\infty} a^k = (1 - a)^{-1}$
A generalization of this idea exists in the matrix setting
#### Matrix Norms¶
Let $A$ be a square matrix, and let
$$\| A \| := \max_{\| x \| = 1} \| A x \|$$
The norms on the right-hand side are ordinary vector norms, while the norm on the left-hand side is a matrix norm — in this case, the so-called spectral norm
For example, for a square matrix $S$, the condition $\| S \| < 1$ means that $S$ is contractive, in the sense that it pulls all vectors towards the origin [2]
#### Neumann’s Theorem¶
Let $A$ be a square matrix and let $A^k := A A^{k-1}$ with $A^1 := A$
In other words, $A^k$ is the $k$-th power of $A$
Neumann’s theorem states the following: If $\| A^k \| < 1$ for some $k \in \mathbb{N}$, then $I - A$ is invertible, and
$$(I - A)^{-1} = \sum_{k=0}^{\infty} A^k \tag{4}$$
A result known as Gelfand’s formula tells us that, for any square matrix $A$,
$$\rho(A) = \lim_{k \to \infty} \| A^k \|^{1/k}$$ | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
$$\rho(A) = \lim_{k \to \infty} \| A^k \|^{1/k}$$
Here $\rho(A)$ is the spectral radius, defined as $\max_i |\lambda_i|$, where $\{\lambda_i\}_i$ is the set of eigenvalues of $A$
As a consequence of Gelfand’s formula, if all eigenvalues are strictly less than one in modulus, there exists a $k$ with $\| A^k \| < 1$
In which case (4) is valid
### Positive Definite Matrices¶
Let $A$ be a symmetric $n \times n$ matrix
We say that $A$ is
1. positive definite if $x' A x > 0$ for every $x \in \mathbb R ^n \setminus \{0\}$
2. positive semi-definite or nonnegative definite if $x' A x \geq 0$ for every $x \in \mathbb R ^n$
Analogous definitions exist for negative definite and negative semi-definite matrices
It is notable that if $A$ is positive definite, then all of its eigenvalues are strictly positive, and hence $A$ is invertible (with positive definite inverse)
### Differentiating Linear and Quadratic forms¶
The following formulas are useful in many economic contexts. Let
• $z, x$ and $a$ all be $n \times 1$ vectors
• $A$ be an $n \times n$ matrix
• $B$ be an $m \times n$ matrix and $y$ be an $m \times 1$ vector
Then
1. $\frac{\partial a' x}{\partial x} = a$
2. $\frac{\partial A x}{\partial x} = A'$
3. $\frac{\partial x'A x}{\partial x} = (A + A') x$
4. $\frac{\partial y'B z}{\partial y} = B z$
5. $\frac{\partial y'B z}{\partial B} = y z'$
Exercise 1 below asks you to apply these formulas
The documentation of the scipy.linalg submodule can be found here
Chapters 2 and 3 of the Econometric Theory contains a discussion of linear algebra along the same lines as above, with solved exercises
If you don’t mind a slightly abstract approach, a nice intermediate-level text on linear algebra is [Janich94]
## Exercises¶
### Exercise 1¶
Let $x$ be a given $n \times 1$ vector and consider the problem
$$v(x) = \max_{y,u} \left\{ - y'P y - u' Q u \right\}$$
subject to the linear constraint
$$y = A x + B u$$
Here | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
subject to the linear constraint
$$y = A x + B u$$
Here
• $P$ is an $n \times n$ matrix and $Q$ is an $m \times m$ matrix
• $A$ is an $n \times n$ matrix and $B$ is an $n \times m$ matrix
• both $P$ and $Q$ are symmetric and positive semidefinite
(What must the dimensions of $y$ and $u$ be to make this a well-posed problem?)
One way to solve the problem is to form the Lagrangian
$$\mathcal L = - y' P y - u' Q u + \lambda' \left[A x + B u - y\right]$$
where $\lambda$ is an $n \times 1$ vector of Lagrange multipliers
Try applying the formulas given above for differentiating quadratic and linear forms to obtain the first-order conditions for maximizing $\mathcal L$ with respect to $y, u$ and minimizing it with respect to $\lambda$
Show that these conditions imply that
1. $\lambda = - 2 P y$
2. The optimizing choice of $u$ satisfies $u = - (Q + B' P B)^{-1} B' P A x$
3. The function $v$ satisfies $v(x) = - x' \tilde P x$ where $\tilde P = A' P A - A'P B (Q + B'P B)^{-1} B' P A$
As we will see, in economic contexts Lagrange multipliers often are shadow prices
Note
If we don’t care about the Lagrange multipliers, we can substitute the constraint into the objective function, and then just maximize $-(Ax + Bu)'P (Ax + Bu) - u' Q u$ with respect to $u$. You can verify that this leads to the same maximizer.
## Solutions¶
### Solution to Exercise 1¶
We have an optimization problem:
$$v(x) = \max_{y,u} \{ -y'Py - u'Qu \}$$
s.t.
$$y = Ax + Bu$$
with primitives
• $P$ be a symmetric and positive semidefinite $n \times n$ matrix
• $Q$ be a symmetric and positive semidefinite $m \times m$ matrix
• $A$ an $n \times n$ matrix
• $B$ an $n \times m$ matrix
The associated Lagrangian is :
$$L = -y'Py - u'Qu + \lambda' \lbrack Ax + Bu - y \rbrack$$
#### 1.¶
Differentiating Lagrangian equation w.r.t y and setting its derivative equal to zero yields
$$\frac{ \partial L}{\partial y} = - (P + P') y - \lambda = - 2 P y - \lambda = 0 \:,$$
since P is symmetric | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
since P is symmetric
Accordingly, the first-order condition for maximizing L w.r.t. y implies
$$\lambda = -2 Py \:$$
#### 2.¶
Differentiating Lagrangian equation w.r.t. u and setting its derivative equal to zero yields
$$\frac{ \partial L}{\partial u} = - (Q + Q') u - B'\lambda = - 2Qu + B'\lambda = 0 \:$$
Substituting $\lambda = -2 P y$ gives
$$Qu + B'Py = 0 \:$$
Substituting the linear constraint $y = Ax + Bu$ into above equation gives
$$Qu + B'P(Ax + Bu) = 0$$$$(Q + B'PB)u + B'PAx = 0$$
which is the first-order condition for maximizing L w.r.t. u
Thus, the optimal choice of u must satisfy
$$u = -(Q + B'PB)^{-1}B'PAx \:,$$
which follows from the definition of the first-order conditions for Lagrangian equation
#### 3.¶
Rewriting our problem by substituting the constraint into the objective function, we get
$$v(x) = \max_{u} \{ -(Ax+ Bu)'P(Ax+Bu) - u'Qu \} \:$$
Since we know the optimal choice of u satisfies $u = -(Q + B’PB)^{-1}B’PAx$, then
$$v(x) = -(Ax+ B u)'P(Ax+B u) - u'Q u \,\,\,\, with \,\,\,\, u = -(Q + B'PB)^{-1}B'PAx$$
To evaluate the function
\begin{aligned} v(x) &= -(Ax+ B u)'P(Ax+Bu) - u'Q u \\ &= -(x'A' + u'B')P(Ax+Bu) - u'Q u \\ &= - x'A'PAx - u'B'PAx - x'A'PBu - u'B'PBu - u'Qu \\ &= - x'A'PAx - 2u'B'PAx - u'(Q + B'PB) u \end{aligned}
For simplicity, denote by $S := (Q + B'PB)^{-1} B'PA$, then $u = -Sx$
Regarding the second term $- 2u'B'PAx$,
\begin{aligned} -2u'B'PAx &= -2 x'S'B'PAx \\ & = 2 x'A'PB( Q + B'PB)^{-1} B'PAx \end{aligned}
Notice that the term $(Q + B'PB)^{-1}$ is symmetric as both P and Q are symmetric
Regarding the third term $- u'(Q + B'PB) u$,
\begin{aligned} -u'(Q + B'PB) u &= - x'S' (Q + B'PB)Sx \\ &= -x'A'PB(Q + B'PB)^{-1}B'PAx \end{aligned}
Hence, the summation of second and third terms is $x'A'PB(Q + B'PB)^{-1}B'PAx$
This implies that
\begin{aligned} v(x) &= - x'A'PAx - 2u'B'PAx - u'(Q + B'PB) u\\ &= - x'A'PAx + x'A'PB(Q + B'PB)^{-1}B'PAx \\ &= -x'[A'PA - A'PB(Q + B'PB)^{-1}B'PA] x \end{aligned} | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
Therefore, the solution to the optimization problem $v(x) = -x' \tilde{P}x$ follows the above result by denoting $\tilde{P} := A'PA - A'PB(Q + B'PB)^{-1}B'PA$
Footnotes
[1] Although there is a specialized matrix data type defined in NumPy, it’s more standard to work with ordinary NumPy arrays. See this discussion.
[2] Suppose that $\|S \| < 1$. Take any nonzero vector $x$, and let $r := \|x\|$. We have $\| Sx \| = r \| S (x/r) \| \leq r \| S \| < r = \| x\|$. Hence every point is pulled towards the origin.
• Share page | {
"domain": "quantecon.org",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9933071480850775,
"lm_q1q2_score": 0.8781225438157374,
"lm_q2_score": 0.8840392878563335,
"openwebmath_perplexity": 563.742457601918,
"openwebmath_score": 0.954851508140564,
"tags": null,
"url": "https://lectures.quantecon.org/py/linear_algebra.html"
} |
# Thread: Summing a geometric series
1. ## Summing a geometric series
Hi all. I have been asked to sum this series:
1+4x+7x^2+10x^3+...+(3N-2)x^N
and also asked what the sum is to infinity when |x|< 1
I have all of the formulae (dodgy spelling ) for summing a series and sum to infinity but this one has me stumped; mainly because at the back of the text book the given anser is:
[3/(1-x)^2]-[2/(1-x)]
I just don't know how to get this answer. It's caused a bit of a mental block for me and his becoming quite annoying! Any help on working through to get this answer would be really helpful and much appreciated. Thanks in advance!
2. Originally Posted by morrey
Hi all. I have been asked to sum this series:
1+4x+7x^2+10x^3+...+(3N-2)x^{N-1}
and also asked what the sum is to infinity when |x|< 1
I have all of the formulae (dodgy spelling ) for summing a series and sum to infinity but this one has me stumped; mainly because at the back of the text book the given anser is:
[3/(1-x)^2]-[2/(1-x)]
I just don't know how to get this answer. It's caused a bit of a mental block for me and his becoming quite annoying! Any help on working through to get this answer would be really helpful and much appreciated. Thanks in advance!
You have a typo (corrected in red).
You have $\sum_{i=1}^{N} (3i - 2) x^{i-1} = 3 \sum_{i=1}^{N} i x^{i-1} - 2 \sum_{i=1}^{N} x^{i-1}$.
You know $\sum_{i=1}^{N} x^i$ and $\sum_{i=1}^{N} x^{i-1}$.
Differentiate $\sum_{i=1}^{N} x^i$ to get what $\sum_{i=1}^{N} i x^{i-1}$ is.
3. fantastic, thanks very much. Just what I needed, and as always looking back I wonder how i got stuck! thanks again
4. Hello, morrey!
I don't agree with their answer for the sum of the infinite series.
Find the sum: . $1+4x+7x^2+10x^3+\hdots$
$\begin{array}{ccccc}\text{We have:} & S &=& 1 + 4x + 7x^2 + 10x^3 + 13x^4 + \hdots & {\color{blue}[1]}\\
\text{Multiply by }x: & xS &=& \qquad\; x \;+ 4x^2 + \;7x^3 + 10x^4 + \hdots & {\color{blue}[2]}\end{array}$ | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104924150546,
"lm_q1q2_score": 0.8780978697898391,
"lm_q2_score": 0.9086178975514609,
"openwebmath_perplexity": 579.8435170246513,
"openwebmath_score": 0.9188752174377441,
"tags": null,
"url": "http://mathhelpforum.com/algebra/81433-summing-geometric-series.html"
} |
Subtract [1] - [2]: . $S - xS \;=\;1 + 3x + 3x^2 + 3x^3 + \hdots$
$\text{We have: }(1-x)S \;=\;1 + 3x\underbrace{\left(1 + x + x^2 + x^3 + \hdots\right)}_{\text{geometric series}}$
. . The geometric series has the sum: . $\frac{1}{1-x}$
Hence: . $(1-x)S \:=\:1 + 3x\left(\frac{1}{1-x}\right) \;=\; \frac{1+2x}{1-x}$
. . Therefore: . $\boxed{S \;=\;\frac{1+2x}{(1-x)^2}}$
5. Originally Posted by Soroban
$\text{We have: }(1-x)S \;=\;1 + 3x\underbrace{\left(1 + x + x^2 + x^3 + \hdots\right)}_{\text{geometric series}}$
. .
Where you have factorised and brought out (1+3x), can you do that? Because if you multiplied out those brackets you wouldn't get what you factorised in the first place... I can see your working through though. Just that one point that has confused me a little.
EDIT: also @mr.fantastic i'm not sure it was a typo, that is exactly as written in the text book, unless of course it's typed incorrectly in there! Also, where you have seperated the two sums. Is it possible to take the right summation and change it into the form where you start at i=0 up to i and then x^i-1 becomes just x^i. Because then from there I know what that sum is but can you then subtract the two different answers although they are 'summed' in a slightly different form? THanks for your help so far
EDIT 2: @soropan sorry about that just realised how you have written it. Makes sense now and I agree with what you have given me. Thankyou very much for your quick and friendly response! One point to make actually, could you not just work out the sum for 1+3x+3x^2.... instead of factorising? | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104924150546,
"lm_q1q2_score": 0.8780978697898391,
"lm_q2_score": 0.9086178975514609,
"openwebmath_perplexity": 579.8435170246513,
"openwebmath_score": 0.9188752174377441,
"tags": null,
"url": "http://mathhelpforum.com/algebra/81433-summing-geometric-series.html"
} |
6. Originally Posted by morrey
[snip]
EDIT: also @mr.fantastic i'm not sure it was a typo, that is exactly as written in the text book, unless of course it's typed incorrectly in there! Also, where you have seperated the two sums. Is it possible to take the right summation and change it into the form where you start at i=0 up to i and then x^i-1 becomes just x^i. Because then from there I know what that sum is but can you then subtract the two different answers although they are 'summed' in a slightly different form? THanks for your help so far
[snip]
If you substitute values of N into $(3N-2)x^N$ you will see why I think there's a typo ....
$\sum_{i=1}^{N} x^{i-1} = \sum_{i=0}^{N-1} x^{i}$.
7. Yes, you are correct. It seems that all this amount of confusion on my part partially comes down to a damn silly text book with an incorrect answer and question! Oh well, thanks to you both for your help and explanations! | {
"domain": "mathhelpforum.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9664104924150546,
"lm_q1q2_score": 0.8780978697898391,
"lm_q2_score": 0.9086178975514609,
"openwebmath_perplexity": 579.8435170246513,
"openwebmath_score": 0.9188752174377441,
"tags": null,
"url": "http://mathhelpforum.com/algebra/81433-summing-geometric-series.html"
} |
# SliceContourPlot3D not showing contours for small object
Suppose I am using SliceContourPlot3D to plot the contours of $x^2$ a sphere of radius $R$:
Module[{R, sphere},
R = 1;
sphere = x^2 + y^2 + z^2 == R^2;
SliceContourPlot3D[x^2, sphere, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}]
]
If $R=1$ this looks like:
If I set $R=0.1$ however the contour lines disappear:
I can't find a way to get the contours to appear. Rescaling the function $x^2\rightarrow\frac{x^2}{R^2}$ doesn't do anything, neither does increasing the PerformanceGoal, number of Contours, or PlotPoints. How can I make the contours show up even for a small object?
• Moreover, even the sphere becomes invisible if you will set R=0.001. The step of contours by default is big enough for your case. Try to add the Contours->{0.001} – Rom38 Jun 4 '18 at 6:34
• add the options Contours->Range[-.01,.01,.0005], PlotPoints->100, and PlotRange->All? – kglr Jun 4 '18 at 6:37
• Thanks a lot Rom38 and kglr, manually setting the step size of the contours fixed it. – Ruvi Lecamwasam Jun 4 '18 at 6:48
• @chris, posted an answer. – kglr Jun 4 '18 at 8:26
## 1 Answer
Adding the options PlotRange->All, PlotPoints->100, and Contours-> Range[-.1,.1,.01]^2 gives | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9845754465603678,
"lm_q1q2_score": 0.8780552568939691,
"lm_q2_score": 0.8918110440002045,
"openwebmath_perplexity": 2552.6130886687274,
"openwebmath_score": 0.3408421277999878,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/174560/slicecontourplot3d-not-showing-contours-for-small-object"
} |
# Session 8: ODE stability; stiff system¶
Date: 11/06/2017, Monday
In [1]:
format compact
## ODE Stability¶
### Problem statement¶
Consider a simple ODE
$\frac{dy}{dt} = -a y, \ \ y(0)=y_0$
where $$a$$ is a positive real number.
It can be solved analytically:
$y(t) = y_0e^{-at}$
So the analytical solution decays exponentially. A numerical solution is allowed to have some error, but it should also be decaying. If the solution is instead growing, we say it is unstable.
### Explicit scheme¶
Forward Eulerian scheme for this problem is
$\frac{y_{k+1} - y_k}{h} = -ay_k$
The iteration is given by
$y_{k+1}= (1-ha)y_k$
The solution at the k-th time step can be written out explicitly
$y_k= (1-ha)^ky_0$
We all know that when $$h$$ gets smaller the numerical solution will converge to the true result. But here we are interested in relatively large $$h$$, i.e. we wonder what’s the largest possible $$h$$ we can use while still getting an OK result.
Here are the solutions with different $$h$$.
In [2]:
%plot -s 400,300
% set parameters, can use different value
a = 1;
y0 = 1;
tspan = 10;
% build function
f_true = @(t) y0*exp(-a*t); % true answer
f_forward = @(k,h) (1-h*a).^k * y0; % forward Euler solution
% plot true result
t_ar = linspace(0, tspan); % for plotting
y_true = f_true(t_ar);
plot(t_ar, y_true)
hold on
% plot Forward Euler solution
for h=[2.5, 1.5, 0.5] % try different step size
kmax = round(tspan/h);
k_ar = 0:kmax;
t_ar = k_ar*h;
% we are not doing Forward Euler iteration here
% since the expression is known, we can directly
% get the entire time series
y_forward = f_forward(k_ar, h);
plot(t_ar, y_forward, '-o')
end
% tweak details
ylim([-1,1]);
xlabel('t');ylabel('y');
legend('true solution', 'h=2.5', 'h=1.5', 'h=0.5' , 'Location', 'Best')
There all 3 typical regimes, determined by the magnitude of $$[1-ha]$$ inside the expression $$y_k= (1-ha)^ky_0$$.
1. Small $$h$$: $$0 \le [1-ha] < 1$$ | {
"domain": "readthedocs.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462219033657,
"lm_q1q2_score": 0.8780458834814509,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 1129.366850515747,
"openwebmath_score": 0.9788032174110413,
"tags": null,
"url": "https://am111.readthedocs.io/en/latest/session8_stabiilty.html"
} |
1. Small $$h$$: $$0 \le [1-ha] < 1$$
In this case, $$(1-ha)^k$$ will decay with $$k$$ and always be positve.
We can solve for the range of $$h$$:
$h \le 1/a$
This corresponds to h=0.5 in the above figure.
1. Medium $$h$$: $$-1 \le [1-ha] < 0$$
In this case, the absolute value of $$(1-ha)^k$$ will decay with $$k$$, but it oscillates between negative and postive. This is not desirable, but not that bad, as our solution doesn’t blow up.
We can solve for the range of $$h$$:
$1/a < h \le 2/a$
This corresponds to h=1.5 in the above figure.
1. Large $$h$$: $$[1-ha] < -1$$
In this case, the absolute value of $$(1-ha)^k$$ will increase with $$k$$. That’s the worst case because the true solution will be decaying, but our numerical solution insteads gives exponential growth. Here our numerical scheme is totally wrong, not just inaccurate.
We can solve for the range of $$h$$:
$h > 2/a$
This corresponds to h=2.5 in the above figure.
The take-away is, to obtain a stable solution, the time step size $$h$$ needs to be small enough. The time step requirement depends on $$a$$, i.e. how fast the system is changing. If $$a$$ is large, i.e. the system is changing rapidly, then $$h$$ has to be small enough ($$h<1/a$$ or $$h<2/a$$, depends on what your want) to capture this fast change.
### Implicit scheme¶
But sometimes we really want to use a large step size. For example, we might only care about the steady state where $$t$$ is very large, so we would like to quickly jump to the steady state with very few number of iterations. Implicit method allows us to use a large time step while still keep the solution stable.
Backward Eulerian scheme for this problem is
$\frac{y_{k+1} - y_k}{h} = -ay_{k+1}$ | {
"domain": "readthedocs.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462219033657,
"lm_q1q2_score": 0.8780458834814509,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 1129.366850515747,
"openwebmath_score": 0.9788032174110413,
"tags": null,
"url": "https://am111.readthedocs.io/en/latest/session8_stabiilty.html"
} |
Backward Eulerian scheme for this problem is
$\frac{y_{k+1} - y_k}{h} = -ay_{k+1}$
In general, the right hand-side would be some function $$f(y_{k+1})$$, and we need to solve a nonlinear equation to obtain $$y_{k+1}$$. This is why this method is called implicit. But in this problem here we happen to have a linear function, so we can still write out the iteration explicitly.
$y_{k+1}= \frac{y_k}{1+ha}$
The solution at the k-th time step can be written as
$y_k= \frac{y_0}{(1+ha)^k}$
Here are the solutions with different $$h$$.
In [3]:
%plot -s 400,300
% set parameters, can use different value
a = 1;
y0 = 1;
tspan = 10;
% build function
f_true = @(t) y0*exp(-a*t); % true answer
f_backward = @(k,h) (1+h*a).^(-k) * y0; % backward Euler solution
% plot true result
t_ar = linspace(0, tspan); % for plotting
y_true = f_true(t_ar);
plot(t_ar, y_true)
hold on
% plot Forward Euler solution
for h=[2.5, 1.5, 0.5] % try different step size
kmax = round(tspan/h);
k_ar = 0:kmax;
t_ar = k_ar*h;
% we are not doing Forward Euler iteration here
% since the expression is known, we can directly
% get the entire time series
y_backward = f_backward(k_ar, h);
plot(t_ar, y_backward, '-o')
end
% tweak details
ylim([-0.2,1]);
xlabel('t');ylabel('y');
legend('true solution', 'h=2.5', 'h=1.5', 'h=0.5' , 'Location', 'Best')
Since $$\frac{1}{1+ha}$$ is always smaller than 1 for any positive $$h$$ and postive $$a$$, $$y_k= \frac{y_k}{(1+ha)^k}$$ will always decay. So we don’t have the instability problem as in the explicit method. A large $$h$$ simply gives inaccurate results, but not terribly wrong results.
According to no free lunch theorm, implicit methods must have some additional costs (half joking. that’s another theorm). The cost for an implicit method is solving a nonlinear system. In general we will have $$f(y, t)$$ on the right-hand side of the ODE, not simply $$-ay$$.
### General form¶ | {
"domain": "readthedocs.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462219033657,
"lm_q1q2_score": 0.8780458834814509,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 1129.366850515747,
"openwebmath_score": 0.9788032174110413,
"tags": null,
"url": "https://am111.readthedocs.io/en/latest/session8_stabiilty.html"
} |
### General form¶
Using $$-ay$$ on the right-hand side allows a simple analysis, but the idea of ODE stability/instability applies to general ODEs. For example considering a system like
\begin{align} \frac{dy}{dt} &= -f(t) y \end{align}
You can use the typical magnitude of $$f(t)$$ as the “$$a$$” in the previous analysis.
Even for
\begin{align} \frac{dy}{dt} &= -f(t) y^2 \end{align}
You can consider the typical magnitude of $$yf(t)$$
## Stiff system¶
Consider an ODE system
\begin{align} \frac{dy_1}{dt} &= -a_1y_1 \\ \frac{dy_2}{dt} &= -a_2y_2 \end{align}
Using an explicit method, the time step requirement for the first equation is $$h<1/a_1$$, while the requirement for the second one is $$h<1/a_2$$. If $$a_1 >> a_2$$, we have to use a quite small $$h$$ to accomodate the first requirement, but that’s an overkill for the second equation. You will be using too many unnecessary time steps to solve $$y_2$$
We can define the stiff ratio $$r=\frac{a_1}{a_2}$$. A system is very stiff if $$r$$ is very large. With explicit methods you often need an unnecessarily large amount of time steps to ensure stability. Implicit methods are particularly useful for a stiff system because it has no instability problem.
You might want to solve two equations separately so we can use a larger time step for the second equation to save computing power. But it’s not that easy because in real examples the two equations are often intertwined:
\begin{align} \frac{dy_1}{dt} &= -a_1y_1 -a_3y_2 \\ \frac{dy_2}{dt} &= -a_2y_2 -a_4y_1 \end{align} | {
"domain": "readthedocs.io",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9879462219033657,
"lm_q1q2_score": 0.8780458834814509,
"lm_q2_score": 0.8887587846530937,
"openwebmath_perplexity": 1129.366850515747,
"openwebmath_score": 0.9788032174110413,
"tags": null,
"url": "https://am111.readthedocs.io/en/latest/session8_stabiilty.html"
} |
# Mod of numbers with large exponents [modular order reduction]
I've read about Fermat's little theorem and generally how congruence works. But I can't figure out how to work out these two:
• $13^{100} \bmod 7$
• $7^{100} \bmod 13$
I've also heard of this formula:
$$a \equiv b\pmod n \Rightarrow a^k \equiv b^k \pmod n$$
But I don't see how exactly to use that here, because from $13^1 \bmod 7$ I get 6, and $13^2 \bmod 7$ is 1. I'm unclear as to which one to raise to the kth power here (I'm assuming k = 100?)
Any hints or pointers in the right direction would be great.
• Might be useful to recognize that $6=-1 \mod 7$ Nov 28, 2016 at 0:26
• @KitterCatter Can you explain it a bit more? (possibly as an answer). Is it derived from $n | (a-b)$? Nov 28, 2016 at 0:29
• I don't know about using fermat (not a mathematician by trade) but it might be helpful to know that the Euler totient function of a prime,$p$ is $p-1$ and that if $a^{\phi(p)} \equiv 1 \mod p$ Nov 28, 2016 at 0:31
• Be sure to understand the relation between "mod" as a binary operator vs. ternary relation. See this answer and this one for more on this. If you only know the operator form you will be severely encumbered. Nov 28, 2016 at 0:32
• See also How do I compute $a^b\,\bmod c$ by hand? for many approaches. Sep 8, 2020 at 15:55
The formula you've heard of results from the fact that congruences are compatible with addition and multiplication.
The first power $$13^{100}$$ is easy: $$13\equiv -1\mod 7$$, so $$13^{100}\equiv (-1)^{100}=1\pmod 7.$$
The second power uses Lil' Fermat: for any number $$a\not\equiv 0\mod 13$$, we have $$a^{12}\equiv 1\pmod{13}$$, hence $$7^{100}\equiv 7^{100\bmod12}\equiv 7^4\equiv 10^2\equiv 9\pmod{13}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9932024672423956,
"lm_q1q2_score": 0.8780300048725033,
"lm_q2_score": 0.8840392909114835,
"openwebmath_perplexity": 421.02767674554013,
"openwebmath_score": 0.942609965801239,
"tags": null,
"url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction"
} |
• Very nice answer! When you reference Lil' Fermat did you mean $a\not\equiv0\mod13$? also it looks like you missed a bracket for the exponent in $a^{12} \equiv 1 \mod 13$ Nov 28, 2016 at 0:47
• Thanks for the answer! I'm still a little unclear on how you got to $10^2$ from $7^4$? Nov 28, 2016 at 1:03
• $7^4=(7^2)^2=49^2\equiv 10^2$, that's all. Nov 28, 2016 at 1:12
• Ah okay, thanks! It's clear now :) Nov 28, 2016 at 1:15
• @Kitter Catter: Oh! Yes. I should have re-read my answer before posting. I even missed a pair of brackets. It's fixed now. Thanks for pointing the typos! Nov 28, 2016 at 1:15
Hint $$\,$$ The key idea is that any periodicity of the exponential map $$\,n\mapsto a^n\,$$ allows us to use modular order reduction on exponents as in the results below. We can find small periods $$\,e\,$$ such that $$\,a^{\large e}\equiv 1\,$$ either by Euler's totient or Fermat's little theorem (or by Carmichael's lambda generalization), along with obvious roots of $$\,1\,$$ such as $$\,(-1)^2\equiv 1,$$ then use it as below. When $$a$$ is not coprime to the modulus we can reduce to the coprime case by factoring out their gcd via the mod Distributive law, e.g. here, and many more here.
Theorem $$\ \$$ Suppose that: $$\,\ \color{#c00}{a^{\large e}\equiv\, 1}\,\pmod{\! m}\$$ and $$\, e>0,\ n,k\ge 0\,$$ are integers. Then
$$\qquad n\equiv k\pmod{\! \color{#c00}e}\,\Longrightarrow\,a^{\large n}\equiv a^{\large k}\pmod{\!m}\,\$$ [and $$\rm\color{#f60}{conversely}$$ if $$\,a\,$$ has order $$\,\color{#c00}e\,$$ mod $$\,m$$]
Proof $$\$$ Wlog $$\,n\ge k\,$$ so $$\,a^{\large n-k}\color{#0a0}{a^{\large k}}\equiv \color{#0a0}{a^{\large k}}\!\!\!\overset{\color{#0a0}{\rm cancel}\!\!}\iff a^{\large n-k}\equiv 1$$ $$\Leftarrow\!\![\color{#f50}\Rightarrow]\ n\equiv k\pmod{\!e}\,$$ by here, where we $$\color{#0a0}{{\rm cancelled}\ a^{\large k}}$$ using $$\,a^{\large e}\equiv 1\,\Rightarrow\, a\,$$ is invertible so cancellable (cf. below Remark). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9932024672423956,
"lm_q1q2_score": 0.8780300048725033,
"lm_q2_score": 0.8840392909114835,
"openwebmath_perplexity": 421.02767674554013,
"openwebmath_score": 0.942609965801239,
"tags": null,
"url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction"
} |
Corollary $$\ \ \bbox[7px,border:1px solid #c00]{\!\bmod m\!:\,\ \color{#c00}{a^{\large e}\equiv 1}\,\Rightarrow\, a^{\large n}\equiv a^{\large n\bmod \color{#c00}e}}\,\$$ by $$\ n\equiv n\bmod e\,\pmod{\!e}$$
Remark If modular inverses are known then it is not necessary to restrict to nonnegative powers of $$\,a\,$$ above since $$\,a^{\large e}\equiv 1,\ e> 0\,\Rightarrow\,$$ $$a$$ is invertible by $$\,a a^{\large e-1}\equiv 1\,$$ so $$\,a^{\large -1}\equiv a^{\large e-1}.\,$$ As motivation it may help to consider the additive analog of above multiplicative form, namely
Theorem $$\ \$$ Suppose that: $$\,\ \color{#c00}{e\cdot a \equiv\, 0}\,\pmod{\! m}\$$ and $$\, e>0,\ n,k\,$$ are integers. Then
$$\ \quad n\equiv k\pmod{\! \color{#c00}e}\,\Longrightarrow\,n\cdot a \equiv k\cdot a\pmod{\!m},\,$$ and conversely if $$\,a\,$$ has (+)order $$\,\color{#c00}e\,$$ mod $$\,m$$
Corollary $$\ \ \bbox[7px,border:1px solid #c00]{\!\bmod m\!:\,\ \color{#c00}{e\cdot a\equiv 0}\,\Rightarrow\, n\cdot a\equiv (n\bmod \color{#c00}e)\cdot a}\,\$$ by $$\ n\equiv n\bmod e\,\pmod{\!e}$$
For example: $$\bmod 10\!:\,\ 2\cdot 5 \equiv 0\,\Rightarrow\, n\cdot 5\equiv (n\bmod 2)\cdot 5,\,$$ a well-known fact about the units digits of multiples of $$5,\,$$ i.e. it is $$\,0\,$$ if $$\,n\,$$ is even, else $$\,5.$$
For example: $$\bmod 12\!:\,\ 3\cdot 8 \equiv 0\,\Rightarrow\, n\cdot 8\equiv (n\bmod 3)\cdot 8,\,$$ a fact often known to those working rotating $$\,8\,$$ hour shifts.
The analogy will be clarified if one studies group theory (these are basic facts on cyclic groups). | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9932024672423956,
"lm_q1q2_score": 0.8780300048725033,
"lm_q2_score": 0.8840392909114835,
"openwebmath_perplexity": 421.02767674554013,
"openwebmath_score": 0.942609965801239,
"tags": null,
"url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction"
} |
The analogy will be clarified if one studies group theory (these are basic facts on cyclic groups).
Remark When $$\,n < e\,$$ then $$\,n\bmod e = n\,$$ so mod order reduction yields no simplification. Sometimes we can remedy that if we know that $$\,a\,$$ is a power $$\,a\equiv b^k,\,$$ thus $$\,a^n = (b^k)^n\equiv b^{kn},\,$$ and $$\,kn\bmod e\,$$ might be smaller than $$\,n\,$$ so easier to power, e.g. let's consider an example when $$\,k = 3,\,$$ i.e. when the base $$\,a\,$$ can be seen to be a cube (but we will disguise it a bit by negating it). The simplest cube is $$2^3$$ so we set $$\,a\equiv -2^3,\,$$ in our example below, where $$\,p\,$$ denotes a prime.
\begin {align}\bmod p = 163\!:\, \ \ \ \ \ \ \ \ 155^{54}\equiv\: &(-2^3)^{54}\!\equiv 2^{162}\!\equiv2^{p-1}\equiv 1,\ \ \text{by Fermat; generally}\\[.2em] \bmod p=6j\!+\!1\!:\ (p\!-\!8)^{2j}\equiv\: &(-2^3)^{2j}\!\equiv\, 2^{6j}\,\equiv 2^{p-1}\equiv 1 \end{align}\ \ \
The analog of the above for $$\,k=2\,$$ is essentially the easy part of Euler's Criterion, e.g. here.
• Often it proves simpler to first reduce $\,e\,$ using Euler's Criterion or quadratic reciprocity, e.g. see here.. Jun 8, 2019 at 13:31
Quick answer: $13 = 2\cdot 7-1$ so $13\equiv-1\mod 7$ and therefore $13^{100} \equiv (-1)^{100} \mod 7$
Other one is fairly quick: \begin{eqnarray} \phi(13) = 12\\ \gcd(7,13)=1\\ 7^{100}\equiv7^{4} \mod13\\ 7\rightarrow10\rightarrow5\rightarrow9 \end{eqnarray} Probably a nicer way to do that. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9932024672423956,
"lm_q1q2_score": 0.8780300048725033,
"lm_q2_score": 0.8840392909114835,
"openwebmath_perplexity": 421.02767674554013,
"openwebmath_score": 0.942609965801239,
"tags": null,
"url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction"
} |
• Thanks for the answer. But can you please explain how you arrived to step 3? (in your four-step part of the answer), and why you have calculated the gcd(7, 13)? Nov 28, 2016 at 0:58
• Sure. If gcd(7,13)=1 then 7 is an element in the group under multiplication modulo 13. The number of elements in the group is given by the totient of 13, which is 12. Therefore 7^12 = 1 modulo 13. this strips the problem down to figuring out modulo 12. 100 is 4 modulo 12 so we only need to look at 7^4 modulo 13 Dec 10, 2019 at 15:14 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9932024672423956,
"lm_q1q2_score": 0.8780300048725033,
"lm_q2_score": 0.8840392909114835,
"openwebmath_perplexity": 421.02767674554013,
"openwebmath_score": 0.942609965801239,
"tags": null,
"url": "https://math.stackexchange.com/questions/2033639/mod-of-numbers-with-large-exponents-modular-order-reduction"
} |
# 1 to the 0 power
• So I was on Khan Academy math, and they told me that any number to the 0 power is 1 because normal exponents like 2 to the second power can also be expressed as 1 x (2 x 2), and so any number to the zero power would just be that 1 left over.
But personally, I feel like something is wrong with this. Exponents are how many times a number is multiplied by, right? So wouldn't, say, 1 to the zero power be 0, and then put one in front of it, which would be 1 x 0, which would still be zero? It feels like with exponents of 0, we're not being consistent.
On a material level, it's the same thing. I have 0 copies of some amount of some thing, so I have one copy of it? Isn't mathematics created so we can use it in the real world?
• @The-Rogue-Blade
I’m not an expert myself, but I’ll try to answer your question.
First, let’s look at $$1 \times 0$$. $$0$$, right?
Why is the answer $$0$$?
Multiplication can be thought repeated addition, and 1 added to itself $$0$$ times is 0.
But is there anything interesting about $$0$$?
Anything $$+0$$ is always going to be equal to itself. I think this is called the “addition identity”.
Now, let’s look at $$1^0$$. The answer is $$1$$.
But why $$1$$?
First, exponents or powers can be thought as repeated multiplication.
$$1$$ is what we call the “multiplication identity”, as anything $$\times 1$$ is always equal to itself.
So my assumption is that mathematicians continued this pattern of “anything to the operation of $$0$$ is equal to the identity of the operation in question’s definition, which is another operation repeated.”
This is a bit long, so I hope it doesn’t waste too much time reading this post.
Hope it helps!
• @RZ923 That is an excellent answer! I'd like to add another comment here which comes from a different angle:
@The-Rogue-Blade said in 1 to the 0 power: | {
"domain": "poshenloh.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517482043892,
"lm_q1q2_score": 0.8779924477927453,
"lm_q2_score": 0.8976952900545975,
"openwebmath_perplexity": 364.47324659859356,
"openwebmath_score": 0.8470790982246399,
"tags": null,
"url": "https://forum.poshenloh.com/topic/309/1-to-the-0-power"
} |
@The-Rogue-Blade said in 1 to the 0 power:
But personally, I feel like something is wrong with this. Exponents are how many times a number is multiplied by, right? So wouldn't, say, 1 to the zero power be 0, and then put one in front of it, which would be 1 x 0, which would still be zero?
As an example of exponent multiplication, when we times together $$2^3$$ and $$2^4,$$ for example, then we get
$$2^3 \times 2^4 = 2^7$$
since
$$\textcolor{blue}{2 \times 2 \times 2} \times \textcolor{red}{2 \times 2 \times 2 \times 2} = 2 \times 2 \times 2 \times 2 \times 2 \times 2 \times 2$$
We add the powers together.
$$\textcolor{blue}{2^3} \times \textcolor{red}{2^4} = 2^{3 + 4}$$
If we multiply something to the zero power, like $$2^0,$$ and another power of $$2,$$
$$2^0 \times 2^4 = 2^{0 + 4}$$
we will expect the power on the exponent $$2^4$$ to remain the same, since $$0$$ is the identity under addition. (This relates to what @RZ923 said, about additive identities.)
Thus $$2^0$$ is the multiplicative identity, and it's because when the powers sum together, $$0$$ is summed as the additive identity.
$$2^0 \times 2^{\textcolor{red}{\text{anything}}} = 2^{0 + \textcolor{red}{\text{anything}}}$$
$$2^0 \times 2^{\textcolor{red}{\text{anything}}} = 2^{\textcolor{red}{\text{anything}}}$$
$$1 \times 2^{\textcolor{red}{\text{anything}}} = 2^{\textcolor{red}{\text{anything}}}$$
$$\boxed{1 = 2^0}$$
• I mean, there's also like continuing a pattern, but shouldn't math be applied and not just working in theory?
• We already have a ton of exceptions in math, and including one here wouldn't be a problem. Besides, it would be possible to derive this exception easily.
• @The-Rogue-Blade Good point! In practice, $$x^0 = 1$$ works in the sense that it's better than $$x^0 = 0,$$ because if $$x^0 = 0,$$ then we get
$$\textcolor{red}{x^0} \times x^4 = 0$$
$$\textcolor{red}{0} \times x^4 = 0$$ | {
"domain": "poshenloh.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517482043892,
"lm_q1q2_score": 0.8779924477927453,
"lm_q2_score": 0.8976952900545975,
"openwebmath_perplexity": 364.47324659859356,
"openwebmath_score": 0.8470790982246399,
"tags": null,
"url": "https://forum.poshenloh.com/topic/309/1-to-the-0-power"
} |
$$\textcolor{red}{x^0} \times x^4 = 0$$
$$\textcolor{red}{0} \times x^4 = 0$$
which is a bit strange, since $$\textcolor{red}{x^0}$$ would be able to have this destructive property of obliterating all other exponents.
Additionally, when we prime factorize a number, like $$60,$$
$$60 = 2^2 \times 3^1 \times 5^1$$
we might want to be able to list them out with all primes as a sort of basis, like
$$60 = 2^2 \times 3^1 \times 5^1 \times \textcolor{red}{7^0} \times \textcolor{red}{11^0} \times \textcolor{red}{13^0} \ldots$$
We would only be able to do so if we define $$x^0$$ to equal $$1.$$
• Well, that's just my point of view on this. I was also about to ask why the code was weird
• @The-Rogue-Blade It might be because it's a fresh post, and it takes awhile for the site to render the code...? I'm not sure, but refreshing often fixes the problem!
• Interesting discussion! What do you guys think $$0^0$$ is?
• @thomas It's probably undefined. Since 0^x = 0 and x^0=1 for all nonzero x, if x were to be 0, we would have 0=1, which is very, uh,
let's just not think about that.
• @Potato2017 Interesting! It seems like it's unclear if we can even do it at all...
Would perhaps this graph change your mind?
This is a graph of the function $$x^x$$. What this graph is saying is that if you look at $$1^1$$, $$0.1^{0,1}$$, $$0.01^{0.01}$$, ... these numbers get closer and closer to $$1$$. Do you think that means that $$0^0$$ should be $$1$$? Why or why not? | {
"domain": "poshenloh.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517482043892,
"lm_q1q2_score": 0.8779924477927453,
"lm_q2_score": 0.8976952900545975,
"openwebmath_perplexity": 364.47324659859356,
"openwebmath_score": 0.8470790982246399,
"tags": null,
"url": "https://forum.poshenloh.com/topic/309/1-to-the-0-power"
} |
• @The-Blade-Dancer
I came up with another way of explaining why $$1^0$$ is $$1$$. It had something to do with Place Value.
Let’s just look at base 10.
Any number, say $$1729$$, can be represented with powers of 10.
For example, the $$1$$ represents $$1000$$, or $$1 \times 10^3$$. The $$7$$ represents $$7 \times 10^2$$, and the $$2$$ represents $$2 \times 10^1$$.
Now let’s look at the $$9$$. What does it represent.
Continuing our pattern, it represents $$9 \times 10^0$$.
So $$10^0$$ must be one. If it’s $$0$$, then we don’t have place value.
Hope that helps
• lol you have a point there | {
"domain": "poshenloh.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9780517482043892,
"lm_q1q2_score": 0.8779924477927453,
"lm_q2_score": 0.8976952900545975,
"openwebmath_perplexity": 364.47324659859356,
"openwebmath_score": 0.8470790982246399,
"tags": null,
"url": "https://forum.poshenloh.com/topic/309/1-to-the-0-power"
} |
# Posterior predictive check for linear multilevel model: am I doing it right?
Dear all
I am new to Stan, and as a learning exercise I wanted to estimate a Bayesian multilevel linear model for the sleepstudy dataset (in the lme4 package). The model have subject-specific intercepts and slopes, assumed to have a normal distribution across subjects, with (possibly) non-zero correlation. The model seems to run correctly, and I get estimates that are sufficiently close to what I obtain with lme4.
I wanted to simulate the model to do a posterior predictive check (estimating p \left( y^{\text{rep}} \mid y \right)). In order to do that I am simulating new observations, from new simulated subjects, in the generated quantities block. Is that the best way to proceed? It seems to work correctly (see plot; the blue bands represents the 95% percentile intervals of the distribution of simulated y^{\text{rep}})
Moreover, the only way I found to generate the random intercepts and slopes is with a loop. Is that the only way, or there is a more efficient way to generate directly a matrix of normal random variates with given variance-covariance matrix?
Thanks!
data {
int<lower=1> N; // number of observations
real RT[N]; // reaction time (transformed in seconds)
int<lower=0,upper=9> Days[N]; // predictor
int<lower=1> J; // number of subjects
int<lower=1,upper=J> Subject[N]; // subject id
}
parameters {
vector[2] beta; // fixed-effects parameters
real<lower=0> sigma_e; // residual std
vector<lower=0>[2] sigma_u; // random effects standard deviations
cholesky_factor_corr[2] L_u; // L_u is the Choleski factor of the correlation matrix
matrix[2,J] z_u; // random effect matrix
}
transformed parameters {
matrix[2,J] u;
u = diag_pre_multiply(sigma_u, L_u) * z_u; // use Cholesky to set correlation
}
model {
real mu; // conditional mean of the dependent variable | {
"domain": "mc-stan.org",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978051741806865,
"lm_q1q2_score": 0.8779924440574133,
"lm_q2_score": 0.897695292107347,
"openwebmath_perplexity": 3722.6402103720493,
"openwebmath_score": 0.6761679649353027,
"tags": null,
"url": "https://discourse.mc-stan.org/t/posterior-predictive-check-for-linear-multilevel-model-am-i-doing-it-right/5729"
} |
model {
real mu; // conditional mean of the dependent variable
//priors
L_u ~ lkj_corr_cholesky(2); // LKJ prior for the correlation matrix
to_vector(z_u) ~ normal(0,1); // before Cholesky, random effects are normal variates with SD=1
sigma_u ~ cauchy(0, 0.5); // SD of random effects (vectorized)
sigma_e ~ cauchy(0, 0.5); // prior for residual standard deviation
beta[1] ~ normal(0.3, 1); // prior for fixed-effect intercept
beta[2] ~ normal(0.01, 0.5); // prior for fixed-effect slope
//likelihood
for (i in 1:N){
mu = beta[1] + u[1,Subject[i]] + (beta[2] + u[2,Subject[i]])*Days[i];
RT[i] ~ normal(mu, sigma_e);
}
}
generated quantities {
// simulate model for posterior predictive check
real y_rep[N];
matrix[2,J] u_rep; // simulate 'random effects'
for (j in 1:J) {
u_rep[1:2,j] = multi_normal_rng(rep_vector(0,2), diag_matrix(sigma_u) * (L_u*L_u') * diag_matrix(sigma_u));
}
for (i in 1:N){
y_rep[i] = normal_rng(beta[1] + u_rep[1,Subject[i]] + (beta[2] + u_rep[2,Subject[i]])*Days[i], sigma_e);
}
}
ppc_sleepstudy.pdf (15.0 KB)
Yes, although you don’t need to do this J times like you currently are, all your J 'new ’ individuals come from the same distribution (there is nothing in the loop over J that is specific to each individual).
Loops are typically your best bet in the generated quantities block, in this instance you could use the fact you have the Cholesky and use multi_normal_cholesky_rng, i.e.
u_rep = multi_normal_cholesky_rng(rep_vector(0, 2), diag_matrix(sigma_u) * (L_u));
although I can’t remember off the top of my head if cholesky_factor_corr is upper or lower triangular, you may need the transpose in either case. Also, you can use diag_pre_multiply,
u_rep = multi_normal_cholesky_rng(rep_vector(0, 2), diag_pre_multiply(sigma_u, L_u));
To avoid calling diag_matrix.
1 Like
I might write the generated quantities block like this:
generated quantities {
vector[N] y_rep;
{
vector [2] u_rep;
vector [N] temp_mu; | {
"domain": "mc-stan.org",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978051741806865,
"lm_q1q2_score": 0.8779924440574133,
"lm_q2_score": 0.897695292107347,
"openwebmath_perplexity": 3722.6402103720493,
"openwebmath_score": 0.6761679649353027,
"tags": null,
"url": "https://discourse.mc-stan.org/t/posterior-predictive-check-for-linear-multilevel-model-am-i-doing-it-right/5729"
} |
generated quantities {
vector[N] y_rep;
{
vector [2] u_rep;
vector [N] temp_mu;
u_rep = multi_normal_cholesky_rng(rep_vector(0, 2), diag_pre_multiply(sigma_u, L_u));
temp_mu = (beta[1] + u_rep[1]) + (beta[2] + u_rep[2]) * Days;
// Could also do the following using normal_rng in a loop.
// Cholesky of diag matrix is just the diag matrix.
// Use the multi_normal_cholesky_rng call so stan doesn't actually compute
// the Cholesky.
y_rep = multi_normal_cholesky_rng(temp_mu, diag_matrix(rep_vector(sigma_e, N)));
}
}
(not guaranteed to compile and do the correct thing, but I think it should)
1 Like
Thanks a lot for your input! In my code I was generating a new dataset, with the same number of subjects, at each sampling iteration (and was stuck with the loop because I couldn’t find how to use multi_normal_cholesky_rng to fill a matrix - it works only with vectors right?). But as you suggest I realize that this is not necessary, I can just generate only one simulated subject at each iteration (so I only need to generate a vector). I think I can also simplify a bit further, because each subject should tested only once for each value of Days. This resolves my concerns I think.
Also, I tried your code, it does not compile because there are some issues which I don’t understand with the line where temp_mu is computed: No matches for: real * int[] and No matches for: real + ill formed
Checking your data block again, Days is an array of integers, not a vector, which make sense given the data. However, the matrix algebra operations are only defined for vectors / matrices. So you can either loop over the elements of Days and compute the element of temp_mu one at a time, or you can change the type / declaration of Days in the data block to vector<lower=0,upper=9>[N] Days;
I see, thanks! | {
"domain": "mc-stan.org",
"id": null,
"lm_label": "1. Yes\n2. Yes\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.978051741806865,
"lm_q1q2_score": 0.8779924440574133,
"lm_q2_score": 0.897695292107347,
"openwebmath_perplexity": 3722.6402103720493,
"openwebmath_score": 0.6761679649353027,
"tags": null,
"url": "https://discourse.mc-stan.org/t/posterior-predictive-check-for-linear-multilevel-model-am-i-doing-it-right/5729"
} |
# Number Theory – Introduction (1/22) Very general question: What is mathematics? Possible answer: The search for structure and patterns in the universe.
## Presentation on theme: "Number Theory – Introduction (1/22) Very general question: What is mathematics? Possible answer: The search for structure and patterns in the universe."— Presentation transcript:
Number Theory – Introduction (1/22) Very general question: What is mathematics? Possible answer: The search for structure and patterns in the universe. Question: What is Number Theory? Answer: The search for structure and patterns in the natural numbers (aka the positive whole numbers, aka the positive integers). Note: In general, in this course, when we say “number”, we mean natural number (as opposed to rational number, real number, complex number, etc.).
Some Sample Problems in Number Theory Can any number be written a sum of square numbers? Can any number be written as sum of just 2 square numbers? Experiment! See any patterns? Is there a fixed number k such that every number can be written as a sum of at most k square numbers? Same question as the last for cubes, quartics (i.e., 4 th powers), etc. This general problem is called the Waring Problem.
More problems.... Are there any (non-trivial) solutions in natural numbers to the equation a 2 + b 2 = c 2 ? If so, are there only finitely many, or are the infinitely many? Are there any (non-trivial) solutions in natural numbers to the equation a 3 + b 3 = c 3 ? If so, are there only finitely many, or are the infinitely many? For any k > 2, are there any (non-trivial) solutions in natural numbers to the equation a k + b k = c k ? If so, are there only finitely many, or are the infinitely many? This last problem is called Fermat’s Last Theorem. In general, equations in which we seek solutions in the natural numbers only are called Diophantine equations. | {
"domain": "slideplayer.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232889752296,
"lm_q1q2_score": 0.8779652927182477,
"lm_q2_score": 0.8933094103149354,
"openwebmath_perplexity": 401.64948609677765,
"openwebmath_score": 0.9139382243156433,
"tags": null,
"url": "https://slideplayer.com/slide/5979294/"
} |
And yet more... Primes! Definition. A natural number > 1 is called prime if.... Are there infinitely many primes? About how many primes are there below a given number n? (The answer is called the Prime Number Theorem.) Definition. Two primes are called twins if they differ by 2. (Examples?) Are there infinitely many twin primes? (This is, of course, called the Twin Primes Problem.) Is there a number k such that there are infinitely many pairs of primes which are at most k apart? The existence of such a number k was proved this past summer!!!
More with primes Definition. We say two numbers a and b are congruent modulo m if m divides b – a. Are there infinitely many primes which are congruent to 1 modulo 4? To 2 modulo 4? To 3 modulo 4? Can every even number be written as a sum of two primes? (This is called the Goldbach Problem.) Can every odd number be written as a sum of three primes? (This – sort of - is called Vinogradov’s Theorem.)
Assignment for Friday Obtain the text. Read the Introduction and Chapter 1. In Chapter 1 try out Exercises 1, 2, 3 and 5.
Download ppt "Number Theory – Introduction (1/22) Very general question: What is mathematics? Possible answer: The search for structure and patterns in the universe."
Similar presentations | {
"domain": "slideplayer.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9828232889752296,
"lm_q1q2_score": 0.8779652927182477,
"lm_q2_score": 0.8933094103149354,
"openwebmath_perplexity": 401.64948609677765,
"openwebmath_score": 0.9139382243156433,
"tags": null,
"url": "https://slideplayer.com/slide/5979294/"
} |
If two figures are congruent, then they're exactly the same shape, and they're exactly the same size. (ED)*(DG) = the area of the rectangle. Thus, a=d. If two angles of a triangle have measures equal to the measures of two angles of another triangle, then the triangles are similar. Congruent rectangles. Consider the rectangles shown below. It means they should have the same size. The area and perimeter of the congruent rectangles will also be the same. But although "equal areas mean equal sides" is true for squares, it is not true for most geometric figures. However, the left ratio in our proportion reduces. (i) All squares are congruent. Corresponding sides of similar polygons are in proportion, and corresponding angles of similar polygons have the same measure. In other words, if two figures A and B are congruent (see Fig. 2.) So if two figures A and B are congruent, they must have equal areas. 756/7 = 108 units2. Two objects are congruent if they have the same shape, dimensions and orientation. (b) If the areas of two rectangles are same, they are congruent (c) Two photos made up from the same negative but of different size are not congruence. Remember, these are *squares* though. b. (vi) Two triangles are congruent if they have all parts equal. Only if the two triangles are congruent will they have equal areas. (e) There is no AAA congruence criterion. A. We can then solve by cross multiplying. If 2 squares have the same area, then they must have the same perimeter. If two squares have equal areas, they will also have sides of the same length. they have equal areas. if it is can you please explain how you know its true. Since the two polygon have the same area, the rectangles they turn into will be the same. 13. Two geometric figures are called congruent if they have … In other words, if two figures A and B are congruent (see Fig.1) , then using a tracing paper, Fig-1. Here’s another HUGE idea, which is much more appealing for visual thinkers. Girsh. That’s a | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
Fig-1. Here’s another HUGE idea, which is much more appealing for visual thinkers. Girsh. That’s a more equation-based way of proving the areas equal. If two figures X and Y are congruent (see adjoining figure), then using a tracing paper we can superpose one figure over the other such that it will cover the other completely. Yes. Because they have a constant radius and no differentiated sides, the orientation of a circle doesn't factor into congruency. $16:(5 a. If they are not equal, then either S > S or S > S. For now, we assume the former, but the argument for the latter is similar (that case cannot, in fact, occur, see e.g. Figures C C and D have Two figures having equal equal areas, areas need not be congruent. Why should two congruent squares have the same area? (Why? Another way to say this is two squares with the same area are congruent in every way (same area, same sides, same perimeter, same angles). If a pair of _____ are congruent, then they have the same area . b=e. This means that we can obtain one figure from the other through a process of expansion or contraction, possibly followed by translation, rotation or reflection. Congruent Figures: Two figures are called congruent if they have the same shape and same size. Prove that equal chords of congruent circles subtend equal angles at their centres. Claim 1.1. If two triangles have equal areas, then they are congruent. When the diagonals of the project are equal the building line is said to be square. Rhombus. The reflexive property refers to a number that is always equal to itself. In general, two plane figures are said to be congruent only when one can exactly overlap the other when one is placed over the other. If its not be shure to include at least one counterexample in your explanation. But just to be overly careful, let's compute a/d. Yes, let's take two different rectangles:The first one is 4 inches by 5 inches.The second is 2 inches by 10 inches.Both of these have an area of 20 square inches, | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
by 5 inches.The second is 2 inches by 10 inches.Both of these have an area of 20 square inches, and they are not congruent. Two rectangles are called congruent rectangles if the corresponding adjacent sides are equal. So, if two figures X and Y are congruent, they must have equal areas. (d) if two sides and any angle of one triangle are equal to the corresponding sides and an angle of another triangle, then the triangles are not congruent. We then solve by dividing. They have the same area of 36 units^2, but they are not congruent figures. (iii) If two rectangles have equal area, they are congruent. Two circles are congruent if they have the same diameter. If two figures are congruent, then their areas are equal but if two figures have equal area, then they are not always congruent.. For two rectangles to be similar, their sides have to be proportional (form equal ratios). So if two figures A and B are congruent, they must have equal areas. But its converse IS NOT TRUE. False i True Cs have equal areas If the lengths of the corresponding sides of regular polygons are in ratio 1/2, then the ratio of their areas … If triangle RST is congruent to triangle WXY and the area of triangle WXY is 20 square inches, then the area of triangle RST is 20 in.² . They both have a perimeter of 12 units, but they are not the same triangle. This wouldn't hold for rectangles. Dear Student! Recall that two circles are congruent if they have the same radii. In mathematics, we say that two objects are similar if they have the same shape, but not necessarily the same size. Two figures are called congruent, if they have the same shape and the same size. Prove that equal chords of congruent circles subtend equal angles at their centres. (EQ)*(DC) = the area of the parallelogram. "IF TWO TRIANGLES HAVE THE SAME AREA THEN THEY ARE CONGRUENT" Is this a true statement? (iv) If two triangles are equal in area, they are congruent. If two squares have equal areas, they will also have sides of the | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
equal in area, they are congruent. If two squares have equal areas, they will also have sides of the same length. Hence all squares are not congruent. True B. But although "equal areas mean equal sides" is true for squares, it is not true for most geometric figures. All the sides of a square are of equal length. An example of having the same area and not being congruent is the two following rectangles: 1.) 1 0. are equal, then we have found two non-congruent triangles with equal perimeters and equal areas. When a diagonal is drawn in a rectangle, what is true of the areas of the two triangles into which it divides the rectangle? And therefore as congruent shapes have equal lengths and angles they have equal are by definition. If the objects also have the same size, they are congruent. They are equal. but they are not D congruent. Rectangle 2 with length 9 and width 4. Rectangle 1 with length 12 and width 3. TRUE. SAS stands for "side, angle, side". A BFigures A and Bare congruent andhence they have If two figures are congruent ,equal areas. For example, x = x or -6 = -6 are examples of the reflexive property. If two triangles are congruent, then their areas are equal. (18) Which of the following statements are true and which of them false? Combining the re- arrangement of the rst one with the reversed rearrangement of the second one (i.e., taking the common cuts), we can rearrange the rst polygon into the second polygon. In order to prove that the diagonals of a rectangle are congruent, you could have also used triangle ABD and triangle DCA. You should perhaps review the lesson about congruent triangles. Every rectangle can be rearranges into a rectangle with one side equal to 1 Proof. It's very easy for two rectangles to have the same area and different perimeters,or the same perimeter and different areas. Geometry would not be used to check a foundation during construction. Answer: i) False. Congruent circles are circles that are equal in terms of radius, | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
construction. Answer: i) False. Congruent circles are circles that are equal in terms of radius, diameter, circumference and surface area. 1 decade ago. And why does a$1 \times 1$square have an area of$1$unit?) So we have: a=d. However, different squares can have sides of different lengths. ALL of this is based on a single concept: That the quality that we call "area" is an aspect of dimensional lengths and angles. Workers measure the diagonals. Ex 6.4, 4 If the areas of two similar triangles are equal, prove that they are congruent. Therefore, those two areas are equal. ... Two rectangles are congruent if they have the same length and same breadth. Construction workers use the fact that the diagonals of a rectangle are congruent (equal) when attempting to build a “square” footing for a building, a patio, a fenced area, a table top, etc. The ratio of the two longer sides should equal the ratio of the two shorter sides. called congruent, if they have the same shape and the same size. Technically speaking, that COULD almost be the end of the proof. All four corresponding sides of two parallelograms are equal in length that does mean that they are necessarily congruent because one parallelogram may or may not overlap the other in this case because their corresponding interior angles may or may not be equal. 9.1) , then using a tracing paper, Fig. [2]). I would really appreciate if you help me i dont get it at all Ive looked at my notes and nothing im so lost please help me In this sense, two plane figures are congruent implies that their corresponding characteristics are "congruent" or "equal" including not just their corresponding sides and angles, but also their corresponding diagonals, perimeters, and areas. If not then under what conditions will they be congruent? Assuming they meant congruent, this is what I have tried: Conditional: "If a rectangle is square, then its main diagonals are equal" is (True) because this is true of all rectangles. 36 units^2, but not | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
its main diagonals are equal" is (True) because this is true of all rectangles. 36 units^2, but not necessarily the same length congruent will they have the same area and perimeter 12... Figures having equal equal areas, which is much more appealing for visual thinkers side to! Them false is always equal to 1 proof, equal areas similar are... Into will be the same rectangles they turn into will be the same if then. But not necessarily the same length is said to be overly careful, let 's compute a/d objects also sides! That it will cover the other completely since b/e = 1, we say that two are... Have two figures a and B are congruent side, angle, side '' other completely for thinkers! A triangle have measures equal to 1 proof let 's compute a/d objects are will... Could have also used triangle ABD and triangle DCA this means that the diagonals of same! Be square careful, let 's compute a/d the proof triangles with equal perimeters and areas... But although equal areas circumference and surface area way of proving the equal. Same shape and the same area side, angle, side '' in terms of radius, diameter circumference! If you have two figures are called congruent, they will also be the end of project! Every rectangle can be rearranges into a rectangle with one side equal itself. Congruent will they have the same size equal ratios ) ) if two triangles are,! A$ 1 $square have an area of the rectangle if its not be shure to at... To a number that is always equal to the measures of two similar triangles, and 're... Statements are true and which of the two longer sides should equal the building line is said to proportional! Cover the other completely you can superpose one figure over the other.! Therefore as congruent shapes have equal areas mean equal sides '' is true for most figures! Geometry would not be used to check a foundation during construction x and are! Area of 36 units^2, but they are congruent are equal, prove that the dimensions of the property... Following | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
36 units^2, but they are congruent are equal, prove that the dimensions of the property... Following statements are true and which of the same area, prove that equal chords congruent... The parallelogram same triangle that they are congruent have found two non-congruent with! Equal lengths and angles they have equal are by definition congruent ( see.! Sides '' is true for most geometric figures since b/e = 1, we have a/d = 1, have! Building line is said to be overly careful, let 's compute a/d they be congruent explain how you its. Equal the ratio of the two shorter sides are not congruent figures can! You have two figures are called congruent if they have a perimeter of 12 units, they. It will cover the other such that it will cover the other such that it cover... That is always equal to 1 proof Y are congruent ( see Fig no differentiated sides the... A$ 1 $unit? two congruent squares have the same then! Congruent andhence they have the same PARALLELOGRAMS and triangles 153 you can one. Of congruent circles are circles that are equal in area, the left ratio in our proportion reduces surface.... Two non-congruent triangles with equal perimeters and equal areas, areas need not be congruent two objects are similar are... Abd and triangle DCA s another HUGE idea, which is much more appealing for visual thinkers the lesson congruent! X or -6 = -6 are examples of the same area a perimeter of 12 units, but necessarily... To check a foundation during construction have also used triangle ABD and triangle.! Triangle DCA speaking, that COULD almost be the same area vi ) two triangles have the area. Because they have the same area equal area, they will also be the of. Angle, side '' congruent figures example, x = x or -6 = are... Have an area of$ 1 \times 1 $square have an area of the same area with lengths... Should perhaps review the lesson about congruent triangles area with different lengths sides! Congruent '' is this a true statement shorter sides can superpose one | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
with different lengths sides! Congruent '' is this a true statement shorter sides can superpose one figure over the completely... Square have an area of$ 1 \times 1 $unit? speaking, that almost... ( DG ) = the area of the rectangle equal, prove that the diagonals of reflexive! Proportional ( form equal ratios ) if you have two similar triangles, and they 're exactly the same,! Then the triangles are equal the ratio of the same size, will. To a number that is always equal to the measures of two similar,! A$ 1 \times 1 $unit? ( DG ) = the area and of... Dimensions and orientation have sides of a circle does n't factor into congruency... two rectangles are,! Vi ) two triangles are similar if they have a constant radius and differentiated... Congruence criterion order to prove that equal chords of congruent circles subtend angles. Triangles have equal areas which of the reflexive property refers to a number that is equal! Angle, side '' sides are equal that it will cover the other completely two following rectangles 1... To check a foundation during construction if it is can you please how. Tracing paper, Fig: two figures are called congruent if they have the area. And angles they have all parts equal how you know its true example x..., circumference and surface area just to be overly careful, let 's compute a/d will have... Then using a tracing paper, Fig equal ratios ) = the of. Longer sides should equal the building line is said to be overly careful, let 's compute a/d its..., angle, side '' of having the same area proportional ( form ratios!, and corresponding angles of another triangle, then your two triangles are,... Longer sides should equal the building line is said to be overly careful let., the rectangles they turn into will be the same size in,. Another HUGE idea, which is much more appealing for visual thinkers are! Square have an area of$ 1 \times 1 $unit? ) (! Two longer sides should equal the building line is said to be proportional ( equal! Chords of | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
) (! Two longer sides should equal the building line is said to be proportional ( equal! Chords of congruent circles are circles that are equal, prove that they are not congruent figures two! If not then under what conditions will they be congruent since the polygon... Should perhaps review the lesson about congruent triangles the orientation of a rectangle are.. Rectangles to be overly careful, let 's compute a/d Fig.1 ), then they 're exactly same. At their centres figures C C and D have two similar triangles, and they 're exactly the size!, you COULD have also used triangle ABD and triangle DCA they must have equal are by definition same.., let 's compute a/d measures of two angles of a circle does n't factor into.... ( ED ) * ( DG ) = the area and not being congruent is the shorter! Rectangles: 1. counterexample in your explanation ) which of them false ( EQ ) * ( )! 'S compute a/d during construction rectangles have equal areas used to check a foundation during construction two following rectangles 1..., it is not true for most geometric figures same breadth and angles they have the same of... If two figures x and Y are congruent if they have equal areas more equation-based way proving. Mathematics, we have a/d = 1. areas are equal, prove that equal chords of congruent subtend. 2 squares have the same triangle ) = the area of the small rectangles need multiply... Similar polygons are in proportion, and one pair of corresponding sides are,.$ square have an area of $1$ square have an area of 36 units^2 but! ( DG ) = the area and perimeter of 12 units, but not necessarily same... In area, then using a tracing paper, Fig-1 just to be similar, their have! Equal equal areas ( ED ) * ( DG ) = the area of following... Aaa congruence criterion then using a tracing paper, Fig-1 are congruent ( see Fig =,! Them false in other words, if they have the same size x or -6 -6! Prove that the diagonals of the parallelogram sides of different lengths of sides to … two are... | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
Prove that the diagonals of the parallelogram sides of different lengths of sides to … two are... Having equal equal areas shapes have equal lengths and angles they have the same size that objects... The two triangles are equal in terms of radius, diameter, circumference and surface area then a! That ’ s another HUGE idea, which is much more appealing for visual thinkers sides …! Check a foundation during construction and corresponding angles of similar polygons have the same shape and same! Congruent shapes have equal areas your explanation because they have the same shape, dimensions and orientation the adjacent..., that COULD almost be the same radii two non-congruent triangles with equal perimeters equal... The lesson about congruent triangles ABD and triangle DCA the orientation of a square of... Always equal to itself have … if two figures are congruent, you COULD also..., side '' equal angles at their centres equal sides '' is this true. 1, we have a/d = 1. be proportional ( form equal ratios ) a statement! | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
Never Change Song, Most Popular Lladro Figurines, Quantum Philosophy Pdf, William Wordsworth Poems On Nature, Convent School Belgaum, Ncb Online Registration, Wvdnr Fall Trout Stocking 2020, Bannor Toys Puzzle, Celsius Drink Review, | {
"domain": "com.au",
"id": null,
"lm_label": "1. Yes\n2. Yes",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9930961635634175,
"lm_q1q2_score": 0.8779360282435182,
"lm_q2_score": 0.8840392909114836,
"openwebmath_perplexity": 747.8878275257739,
"openwebmath_score": 0.8698499202728271,
"tags": null,
"url": "https://www.cbdconstruct.com.au/scum9/2cf2d6-if-two-rectangles-have-equal-areas%2C-then-they-are-congruent"
} |
# 20 options. 10 must be chosen. how many combinations exist
I have a list of twenty options and each option is different. If ten options must be chosen, how many combinations exist? Can someone show me how the math on this?
Example, if i have 20 different colors of cards. How many combinations can I get from choosing ten of them. I hope that makes sense.
-
Assuming that order doesn't matter, the answer is $$\binom{20}{10} = \frac{20!}{10! 10!}$$ where the left side is read as "20 choose 10."
The reasoning is as follows: We can choose 10 objects out of the 20 by putting all 20 objects in a random order and then taking the first 10 of them (with cards, for example, shuffle them together, then deal off the top 10). This gives us $20!$ possible orders. But we don't care about the order of the ten cards we dealt off--as long as those same cards are the first ten, they can be ordered any way among themselves. So we divide by the number of possible orderings of those ten cards, which is $10!$. By the same reasoning we don't care about the order of the ten cards left in the deck, so we divide by another factor of $10!$ for those.
In general, if you have $n$ objects and you want to choose $k$ of them, the number of possible ways to do that is $$\binom{n}{k} = \frac{n!}{k!(n-k)!}.$$
-
Perfect, Thank you. – user903497 Oct 28 '12 at 22:34
This is assuming that the order of the ten does not matter right? Basically, the set of ten is one combination regardless of the order of the ten. With that said, the formula above still holds right? – user903497 Oct 28 '12 at 23:26
There are 184,756 combinations 10 things, given a set of 20 to choose from.
let me find the Tex for you. Basically, you divide 20! (factorial) by 10!^2 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9948603893595864,
"lm_q1q2_score": 0.8778925354167655,
"lm_q2_score": 0.8824278710924296,
"openwebmath_perplexity": 249.44606946466786,
"openwebmath_score": 0.8379715085029602,
"tags": null,
"url": "http://math.stackexchange.com/questions/223081/20-options-10-must-be-chosen-how-many-combinations-exist"
} |
let me find the Tex for you. Basically, you divide 20! (factorial) by 10!^2
-
can you show me how you calculated that? The set of 20 will increase and I would like to adjust the calculation when it does. Thank you! – user903497 Oct 28 '12 at 22:31
Thank you very much. Confirmed it on wolframm. +1 for speed of answer – user903497 Oct 28 '12 at 22:34
Well, all the big kids already got their Tex in. I guess it's up to you if you prefer speed over prettiness. – New Alexandria Oct 28 '12 at 22:38
Imagine that you choose your $10$ options sequentially. There are $20$ possibilities for the first option. After you’ve chosen it, $19$ possibilities remain for your second option. Continuing to reason in this fashion, we see that there are
$$20\cdot19\cdot18\cdot17\cdot16\cdot15\cdot14\cdot13\cdot12\cdot11$$
ways to choose $10$ options in sequence; this number can be more compactly written $\dfrac{20!}{10!}$.
However, we’ve counted each possible set of $10$ options many, many times: we’ve counted it once for every possible order in which we could have picked it. How many times is that?
Suppose that we have a set of $10$ things, and we line them up. We can choose any of the $10$ to go first; once that’s been done, we can choose any of the $9$ remaining objects to go second; and so on. Thus, we can arrange the $10$ objects in any of $$10\cdot9\cdot8\cdot7\cdot6\cdot5\cdot4\cdot3\cdot2\cdot1=10!$$ orders.
Going back to the original problem, this means that the figure of $\frac{20!}{10!}$ counts each $10$-option set $10!$ times, once for each of orders in which we could have selected it, i.e., once for each of its possible permutations. The number of different sets of $10$ options is therefore only $\frac1{10!}$-th of $\frac{20!}{10!}$, or $\frac{20!}{10!10!}$. This number is the binomial coefficient
$$\binom{20}{10}=\frac{20!}{10!10!}\;.$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9948603893595864,
"lm_q1q2_score": 0.8778925354167655,
"lm_q2_score": 0.8824278710924296,
"openwebmath_perplexity": 249.44606946466786,
"openwebmath_score": 0.8379715085029602,
"tags": null,
"url": "http://math.stackexchange.com/questions/223081/20-options-10-must-be-chosen-how-many-combinations-exist"
} |
$$\binom{20}{10}=\frac{20!}{10!10!}\;.$$
The same reasoning applied to the general problem of counting the $k$-element subsets of a collection of $n$ things leads to the binomial coefficient
$$\binom{n}k=\frac{n!}{k!(n-k)!}\;.$$
- | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9948603893595864,
"lm_q1q2_score": 0.8778925354167655,
"lm_q2_score": 0.8824278710924296,
"openwebmath_perplexity": 249.44606946466786,
"openwebmath_score": 0.8379715085029602,
"tags": null,
"url": "http://math.stackexchange.com/questions/223081/20-options-10-must-be-chosen-how-many-combinations-exist"
} |
# Does there exist a basis for the set of $2\times 2$ matrices such that all basis elements are invertible?
As the title says, I'm wondering whether there exists a basis for the set of $2\times 2$ matrices (with entries from the real numbers) such that all basis elements are invertible.
I have a gut feeling that it is false, but don't know how to prove it. I know that for a matrix to be invertible, it must be row equivalent to the identity matrix and I think I may be able to use this in the proof, but I don't know how.
Thanks in advance for any help,
Jack
• Please check if this question helps. I'm posting it in case you are familiar with symbols: math.stackexchange.com/questions/534875/… Nov 5, 2016 at 15:53
• See Pauli Matrices. Nov 6, 2016 at 0:57
• If you pick four random $2\times2$ matrices (using e.g. normal distribution for each entry) then with probability one they will all be nonsingular, and with probability one they will be linearly independent.
– bof
Nov 6, 2016 at 5:36
Even without finding such a basis, you can see that singular matrices form a hypersurface in $M_{n \times n}(F)$ given by the null set of the determinant map $\det : M_{n \times n}(F) \to F$. When $F = \mathbb R$, for instance, the set of all singular matrices is a closed subset of $M_{n \times n}(F)$ (it is the preimage of $\{ 0 \}$, which is closed, under the continuous determinant map) which is not all of the space, therefore there is an open ball lying outside of this set. As you can prove, we can then find a basis lying in this open ball, hence consisting of invertible matrices.
Explicit counterexamples have been given in other answers, so I will not mention any here.
• You can also use the results of this answer to get explicit results in the nxn case. Nov 5, 2016 at 17:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987758723627135,
"lm_q1q2_score": 0.8778792587484664,
"lm_q2_score": 0.8887588008585925,
"openwebmath_perplexity": 124.24498568763018,
"openwebmath_score": 0.9748818278312683,
"tags": null,
"url": "https://math.stackexchange.com/questions/2000662/does-there-exist-a-basis-for-the-set-of-2-times-2-matrices-such-that-all-basis"
} |
Consider the counter-example basis: $$\beta:=\left\{\begin{pmatrix} 1&0\\0&1\end{pmatrix},\begin{pmatrix} 0&1\\1&0\end{pmatrix},\begin{pmatrix} 1&0\\1&1\end{pmatrix},\begin{pmatrix} 0&1\\1&1\end{pmatrix}\right\}$$
Let $A=\begin{pmatrix} x_1&x_2\\x_3&x_4\end{pmatrix}$, let the following equation:
$$A=a\begin{pmatrix} 1&0\\0&1\end{pmatrix}+b\begin{pmatrix} 0&1\\1&0\end{pmatrix}+c\begin{pmatrix} 1&0\\1&1\end{pmatrix}+d\begin{pmatrix} 0&1\\1&1\end{pmatrix}$$ Then $$\begin{pmatrix} 1&0&1&0\\0&1&0&1\\0&1&1&1\\1&0&1&1\end{pmatrix}\begin{pmatrix} a\\b\\c\\d\end{pmatrix}=\begin{pmatrix} x_1\\x_2\\x_3\\x_4\end{pmatrix}$$ Check $\det\begin{pmatrix} 1&0&1&0\\0&1&0&1\\0&1&1&1\\1&0&1&1\end{pmatrix}=1$ . So there is an unique solution for $A$, hence $\beta$ is a basis of $2$ by $2$ matrix, where all basis elements are invertible.
• Thanks a lot Nick very helpful explanation.
– Jack
Nov 5, 2016 at 16:02
• The first line is a bit confusing. You're presenting an example rather than counterexample here, aren't you? Nov 5, 2016 at 17:34
• @leftaroundabout: An example is a counterexample to the claim that no examples exist. Nov 5, 2016 at 17:47
\begin{align*} \left[ \begin{matrix} 0 & 1 \\ 1 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 0 \\ 1 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 1 \\ 0 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 1 \\ 1 & 0 \end{matrix} \right] \end{align*}
• Thanks Logician6. I appreciate your help,
– Jack
Nov 5, 2016 at 16:03
I just want to point out that, in order to prove that the answer to a question of the form
Does there exist a basis for $M_n(\mathbb{R})$ consisting of [matrices of some special form]?
is "yes", you only actually need to show that the special matrices span all of $M_n(\mathbb{R})$, since any spanning set can be reduced to a basis. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987758723627135,
"lm_q1q2_score": 0.8778792587484664,
"lm_q2_score": 0.8887588008585925,
"openwebmath_perplexity": 124.24498568763018,
"openwebmath_score": 0.9748818278312683,
"tags": null,
"url": "https://math.stackexchange.com/questions/2000662/does-there-exist-a-basis-for-the-set-of-2-times-2-matrices-such-that-all-basis"
} |
It's usually a lot easier to check that some special set matrices are spanning than it is to explicitly describe a basis. Let's look at the case you asked about---invertible matrices. Let $A$ be any matrix. Take $\lambda$ to be a nonzero number which isn't an eigenvalue of $A$ (which can be done because $A$ can have at most $n$ eigenvalues). Then we have $$A = \lambda I + (A-\lambda I)$$ where $\lambda I$ and $A-\lambda I$ are both invertible. Since every matrix can be written as a sum of two invertibles, the invertibles are spanning, and can, in principal, be reduced to a basis.
As a more explicit version of Starfall's answer, in $n\times n$ case, if you denote the standard basis of matrix space by $(E_{i,j})$, you can define a basis simply by $E'_{1,1}=I$, $E'_{i,j}:=I+E_{i,j}$ if one of $i,j$ is not $1$. (You could also take simply $E'_{1,1}:=I+E_{1,1}$, but that would make it harder to show that $(E_{i,j})$ form a basis.)
It is very easy to check that each $E'_{i,j}$ is invertible (just calculate the determinant), the span of $(E'_{i,j})$ contains all $E_{i,j}$ (this is immediate except for $E_{1,1}$, and for $E_{1,1}$ it follows from the observation for $i=j>1$), and since there are $n^2$ of $(E'_{i,j})$, they must form a basis (because the space of matrices is $n^2$-dimensional).
In $2\times 2$ case, the basis is $$\left[ \begin{matrix} 1 & 0 \\ 0 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 1 \\ 0 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 0 \\ 1 & 1 \end{matrix} \right], \left[ \begin{matrix} 1 & 0 \\ 0 & 2 \end{matrix} \right]$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987758723627135,
"lm_q1q2_score": 0.8778792587484664,
"lm_q2_score": 0.8887588008585925,
"openwebmath_perplexity": 124.24498568763018,
"openwebmath_score": 0.9748818278312683,
"tags": null,
"url": "https://math.stackexchange.com/questions/2000662/does-there-exist-a-basis-for-the-set-of-2-times-2-matrices-such-that-all-basis"
} |
(Note that more or less by the same argument as the one cited by Starfall, if you just pick $n^2$ random $n\times n$ matrices (for any reasonable notion of "random", but you can think of normally, independendently distributed coefficients, or independently uniformly distributed in a fixed interval), they will all be invertible and they will be linearly independent, and hence form a basis. This is because the set of non-invertible matrices is very small, as is the set of vectors in a proper subspace of a given real vector space.) | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.987758723627135,
"lm_q1q2_score": 0.8778792587484664,
"lm_q2_score": 0.8887588008585925,
"openwebmath_perplexity": 124.24498568763018,
"openwebmath_score": 0.9748818278312683,
"tags": null,
"url": "https://math.stackexchange.com/questions/2000662/does-there-exist-a-basis-for-the-set-of-2-times-2-matrices-such-that-all-basis"
} |
# Even Fibonacci numbers
Today, I found the Euler Project. Problem #2 is
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibonacci sequence whose values do not exceed four million, find the sum of the even-valued terms.
I have two solutions:
For[i = 1, i < 100, i++, If[Fibonacci[i] > 4000000, Break[]]];
Plus @@ Select[Fibonacci /@ Range[i - 1], Mod[#, 2] == 0 &]
4613732
Plus @@ Select[
Fibonacci /@ Select[Range@100, Fibonacci@# < 4000000 &],
Mod[#1, 2] == 0 &]
4613732
However, I feel my solutions are not good and efficient. So my question is: can you show me more concise and efficient methods?
Also, how cam I test whether a number is a Fibonacci number?
• Since you already have the answer, you may access the problem 2 forum on the Euler project. Here you will find the most efficient algorithms from other users. The third post there demonstrates an algorithm that can be easily calculated without a program. – travisbartley Nov 19 '13 at 5:38
The other methods described work well, but I am partial to exact answers. So, here it is. First, note that the Fibbonacci sequence has a closed form
$$F_n = \frac{\Phi^n - (-\Phi)^{-n}}{\sqrt{5}}$$
where $\Phi$ is the GoldenRatio. Also, as observed elsewhere, we are looking only at every third term, which gives the sum
$$\sum^k_{n = 1} \frac{\Phi^{3n} - (-\Phi)^{-3n}}{\sqrt{5}}$$
which is just the sum of two geometric series. So, after a few steps, this simplifies to
$$\frac{1}{\sqrt{5}} \left[ \Phi^3\frac{1 - (\Phi^3)^{k}}{1-\Phi^3} + \Phi^{-3}\frac{1 - (-\Phi^{-3})^{k}}{1 + \Phi^{-3}} \right]$$
where $k$ is the index of the highest even Fibbonacci number. To find $k$, we can reverse the sequence,
n[F_] := Floor[Log[F Sqrt[5]]/Log[GoldenRatio] + 1/2]
n[4000000]
(* 33 *)
So, $k = 11$. In code, | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
Clear[evenSum];
evenSum[(k_Integer)?Positive] :=
Round @ N[
With[
{phi = GoldenRatio^3, psi = (-GoldenRatio)^(-3)},
(1/Sqrt[5])*(phi*((1 - phi^k)/(1 - phi)) - psi*((1 - psi^k)/(1 - psi)))
], | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
Max[$MachinePrecision, 3 k] (* needed for accuracy *) ] evenSum[11] (* 4613732 *) which is confirmed by Total @ Fibonacci @ Range[3, 33, 3] (* 4613732 *) Edit: The above implementation of n suffers round off problems for large numbers, for example n[9000] gives 21, but Fibonacci[21] is 10946. But, wikipedia gives a better choice Clear[n2]; n2[fn_Integer?Positive] := Floor@N@Log[GoldenRatio, (fn Sqrt[5] + Sqrt[5 fn^2 - 4])/2] n2[10945] (* 20 *) • Had to fix the formulas, I dropped quite a few minus signs in the original version. – rcollyer Nov 18 '13 at 18:04 • Related to your error, of course facebook.com/physic.department/posts/360869444018997 – Dr. belisarius Nov 18 '13 at 18:25 • @belisarius :)) ingenious. – Stefan Nov 18 '13 at 18:27 • @belisarius according to my adviser, his adviser was infamous for making multiple canceling errors. His results were correct, the derivation not usually. :) – rcollyer Nov 18 '13 at 18:31 • Could you explain how these functions n and evenSum should be used for big numbers? I tried to test your solution unsucessfully. While with mine approach I could simply find sums up to 10^10000. – Artes Nov 18 '13 at 18:36 Straight iteration over the even valued Fibonacci numbers is fast. fibSum[max_] := Module[ {tot, n, j}, tot = 0; n = 0; j = 3; While[n = Fibonacci[j]; n <= max, j += 3; tot += n]; tot] Or one can use matrix products. This seems to be about the same speed. It has the advantage of not requiring a built in Fibonacci function. fibSum2[max_] := Module[ {tot, n, fp, mat, mat3}, mat = {{0, 1}, {1, 1}}; tot = 0; n = 0; fp = mat.mat; mat3 = mat.mat.mat; While[n = fp[[2, 2]]; n <= max, fp = fp.mat3; tot += n]; tot] These handle 10^10000 in slightly under a second on my desktop running Mathematica 9.0.1. Here is a test for whether an integer is a Fibonacci number (a Fib detector?) fibQ[n_] := With[{k = Round[Log[GoldenRatio, N[n, 20 + Length[IntegerDigits[n]]]] + Log[GoldenRatio, Sqrt[5]]]}, n == Fibonacci[k]] Sum[Fibonacci[n], {n, 3, | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
+ Log[GoldenRatio, Sqrt[5]]]}, n == Fibonacci[k]] Sum[Fibonacci[n], {n, 3, InverseFunction[Fibonacci][4000000], 3}] (* 4613732 *) • That's tyte, + goes w/o saying. – alancalvitti Oct 30 '14 at 18:18 Here I'd like to show my solution. Since A014445 we know that the generating function of even fibonacci numbers is Fibonacci[3 n], we can write something like this: Plus @@ Select[Table[Fibonacci[3 n], {n, 0, 30}], # < 4000000 &] // AbsoluteTiming => {0., 4613732} An imperative style solution could look like this: res = 0; n = 1; While[res < 4000000, res += Fibonacci[3 n]; n++] Result will be in res and timings are negligible, zero. Edit: To bring that into a cogent form. Here the full definition of SumEvenFibonacci: ClearAll[SumEvenFibonacci]; SumEvenFibonacci::usage = "SumEvenFibonacci[n] calculates the sum of even Fibonacci numbers \ up to the upper-bound n."; SumEvenFibonacci[n_Integer] /; n >= 0 := Module[{res = 0, i = 1}, While[res < n, res += Fibonacci[3 i]; i++]; res ] The Fibonacci function, is Listable and fast increasing. We can observe a simple pattern, every third element is even (see e.g. Fibonacci[Range[12]]), moreover the first number exceeding 4000000 is: NestWhile[(# + 1) &, 1, Fibonacci[#] <= 4 10^6 &], thus we have: Total[ Fibonacci[ Range[3, 33, 3]]] 4613732 and most likely this is the best approach: sum[n_] := Total[ Fibonacci[ Range[3, NestWhile[(# + 1) &, 1, Fibonacci[#] <= n &] - 1, 3]]] e.g. sum[10^600]; // AbsoluteTiming {0.096000, Null} Concerning testing if given numbers are Fibonacci ones there is a simple test based on checking if consecutive elements generate Pythagorean triples (see e.g. this answer) And @@ (#1^2 + #2^2 == #3^2 & @@@ Array[{ Fibonacci[#] Fibonacci[# + 3], 2 Fibonacci[# + 1] Fibonacci[# + 2], Fibonacci[# + 1]^2 + Fibonacci[# + 2]^2} &, 1000]) True • You already got my +1, but, yeah, it looks a little cretinous. – rcollyer Nov 18 '13 at 21:14 • @rcollyer I like your approach, but I still cannot use it successfully. I guess | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
18 '13 at 21:14 • @rcollyer I like your approach, but I still cannot use it successfully. I guess Daniel Lichtblau's solution is the most efficient for big numbers, however I can see that another reliable (mine) solution is the least appreciated. – Artes Nov 18 '13 at 21:20 • A little poking around indicates that n gives the nearest Fibbonacci number, not the one immediately below it, e.g. n[9000] returns 21, not 20. Likely a similar rounding issue is occurring in evenSum, but it tracks Daniel's exactly for a long time. So, I'm not sure of the specific issue. – rcollyer Nov 18 '13 at 21:30 Your solution looks fine. You can take advantage of the fact that every third Fibonacci number is even, which makes it a little faster. Fibonaccis are cheap to compute and they quickly exceed 4 million. Here's a comparison: Select[Fibonacci[3 Range@33], # <= 4*^6 &] // Total // AbsoluteTiming {0.000214, 4613732} Select[Fibonacci@Range@100, # <= 4*^6 && EvenQ@# &] // Total // AbsoluteTiming {0.000566, 4613732} Plus @@ Select[Fibonacci /@ Select[Range@100, Fibonacci@# < 4000000 &], Mod[#1, 2] == 0 &] // AbsoluteTiming {0.000717, 4613732} AbsoluteTiming[ For[i = 1, i < 100, i++, If[Fibonacci[i] > 4000000, Break[]]]; Plus @@ Select[Fibonacci /@ Range[i - 1], Mod[#, 2] == 0 &]] {0.000526, 4613732} I will make use of the formula: sum[x_] := (Fibonacci[3 Quotient[Floor[InverseFunction[Fibonacci][x]], 3]+2]-1)/2 For$x = 4 \times 10^6\$ this gives: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
sum[4 × 10^6] //AbsoluteTiming
{7.82619, 4613732}
This is pretty slow. We can speed up the computation of the inverse of the Fibonacci using the InverseFibonacci function from my answer to (157354). Below I give a version of that inverse function that works for arguments greater than 100:
if[x_?(GreaterThan[100])]:=Root[
{
Fibonacci[#]- x&, SetPrecision[Log[GoldenRatio, x Sqrt[5]],
Min[2 + Log10[x], 10]]
}
]
Now, using if above instead of InverseFunction[Fibonacci]:
fast[x_] := (Fibonacci[3 Quotient[Floor @ if[x], 3] + 2] - 1)/2
and applying this to the problem:
fast[4 10^6] //AbsoluteTiming
{0.000239, 4613732}
We can use this function on much larger arguments as well:
fast[
92837410293847120384712309847213048971230498127340912874091273401298374012938741029
] //AbsoluteTiming
{0.002153, 88011840322506983234113472696205625385192191652246095943362996448287672522108009837}
Actually this sum can be closed-form analytically:
(* sum of even-valued Fibonacci terms that do not exceed z *)
sum[z_] := Module[{g, n, f},
g = (1 + Sqrt[5])/2;
n = Floor[Log[Sqrt[5] z]/Log[g]];
f = Round[g^(n + 2)/Sqrt[5]];
(f - 1)/2]
sum[4*^6] // RepeatedTiming
(* {0.0000448, 4613732} *)
sum[1*^100] // RepeatedTiming
(* {0.000045, 12065...3520} *)
I used these identities on mathworld: (8), (22), although one should first recognize that only every third term is even. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211604938802,
"lm_q1q2_score": 0.877855487909809,
"lm_q2_score": 0.900529782780931,
"openwebmath_perplexity": 2165.496798738016,
"openwebmath_score": 0.7159161567687988,
"tags": null,
"url": "https://mathematica.stackexchange.com/questions/37266/even-fibonacci-numbers"
} |
# Is it acceptable to have a fraction in an eigenvector?
The professor teaching a class I am taking wants me to find the eigenvalues and the eigenvectors for the following matrix below.
$$\begin{bmatrix}-5 & 5\\4 & 3\end{bmatrix}$$
I have succeeded in getting the eigenvalues, which are $$\lambda= \{ 5,-7 \}$$. When finding the eigenvector for $$\lambda= 5$$, I get $$\begin{bmatrix}1/2\\1 \end{bmatrix}$$. However, the correct answer is $$\begin{bmatrix}1\\2 \end{bmatrix}$$ .
I have tried doing this question using multiple online matrix calculators. One of which gives me $$\begin{bmatrix}1/2\\1 \end{bmatrix}$$, and the other gives me $$\begin{bmatrix}1\\2 \end{bmatrix}$$.
The online calculator that gave me $$\begin{bmatrix}1\\2 \end{bmatrix}$$ explains, that y=2, hence $$\begin{bmatrix}1/2·2\\1·2 \end{bmatrix} = \begin{bmatrix}1\\2 \end{bmatrix}$$.
What I do not understand is, why is y must equal to 2?Is it because there cannot be a fraction in an eigenvector?
• Both are eigenvectors. Eigenvectors are not unique in general. – Arctic Char Nov 30 '19 at 9:32
• A constant times an eigenvector is also an eigenvector. – Ameet Sharma Nov 30 '19 at 10:06
• Conclusion: Any scalar that is multiplied with an eigenvector is still an eigenvector (In the same eigenspace). Even when the eigenvector is multiplied with different scalars, the λ would be the same, Av = λV. *I cannot choose which comment is the best since all of it helped me in understanding the given problem. Thank you all. – Kamarul Adha Nov 30 '19 at 10:36
• For some reason most problems I've encountered (in college) have asked me to find eigenvalues and the corresponding eigenvectors, when in reality what we care about are the eigenvalues and the corresponding eigenspaces. – BallpointBen Nov 30 '19 at 22:43
• @KamarulAdha: Second conclusion: If anyone tells you that $v$ is an eigenvector of a matrix but $2v$ is not, that one does not know mathematics. – user21820 Dec 1 '19 at 15:28 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623861,
"lm_q1q2_score": 0.8778554833475471,
"lm_q2_score": 0.9005297787765764,
"openwebmath_perplexity": 191.53619245914248,
"openwebmath_score": 0.964476466178894,
"tags": null,
"url": "https://math.stackexchange.com/questions/3456797/is-it-acceptable-to-have-a-fraction-in-an-eigenvector"
} |
By definition, an eigenvalue $$\lambda$$ and one corresponding eigenvector $$v$$ must satisfy the following equation:
$$Av = \lambda v.$$
Now, consider the vector
$$w = \alpha v,$$
where $$\alpha$$ is a non null number.
Then, notice that:
$$Aw = A(\alpha v) = \alpha (Av) = \alpha (\lambda v) = \lambda (\alpha v) =\lambda w.$$
Therefore:
$$Aw = \lambda w,$$
and hence $$w$$ is another eigenvector associated to the eigenvalue $$\lambda$$.
In general, it is not true that there is only one eigenvector associated to the eigenvalue $$\lambda$$. Instead, there is a linear subspace, also known as the eigenspace associated to $$\lambda$$. Informally, there are infinitely many eigenvectors to $$\lambda$$, which belong to a certain eigenspace. Given one eigenvector (say $$v$$), then all the multiples of $$v$$ except for $$0$$ (i.e. $$w = \alpha v$$ with $$\alpha \neq 0$$) are also eigenvectors.
There are matrices with eigenvectors that have irrational components, so there is no rule that your eigenvector must be free of fractions or even radical expressions. As an example:
$$\begin{bmatrix}1 & 2\\1 & 1\end{bmatrix}$$
Which has eigenvalues of $$1 \pm \sqrt{2}$$ and eigenvectors of $$\begin{bmatrix}\pm\sqrt{2} \\ 1\end{bmatrix}$$
(Additionally, because of the unsolvability of the quintic, there are even eigenvectors that cannot be expressed in elementary functions.)
Because of the form of the equations that you solve to get the eigenvectors, you have infinite solutions to the eigenvectors. Additionally, an eigenvector is only really valuable as a direction. So if any eigenvector can be said to be the "correct" or "most special" one, it's the one that has a norm of 1, or a norm of the associated eigenvalue. However, these can be actually a bit ugly to express. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623861,
"lm_q1q2_score": 0.8778554833475471,
"lm_q2_score": 0.9005297787765764,
"openwebmath_perplexity": 191.53619245914248,
"openwebmath_score": 0.964476466178894,
"tags": null,
"url": "https://math.stackexchange.com/questions/3456797/is-it-acceptable-to-have-a-fraction-in-an-eigenvector"
} |
For our example they are: norm 1, $$\begin{bmatrix}\pm\sqrt{\frac{2}{3}} \\ \sqrt{\frac1{3}}\end{bmatrix}$$ norm $$\lambda$$: $$\frac1{3}\begin{bmatrix}\mp 2\sqrt{3} \pm\sqrt{6} \\ \sqrt{3} \pm \sqrt{6} \end{bmatrix}$$.
That being said, it is, of course, nicer to work with whole numbers when the opportunity arises.
$$\begin{bmatrix}-5 & 5\\4 & 3\end{bmatrix}\begin{bmatrix}\frac12\\1 \end{bmatrix}=\begin{bmatrix}\frac52\\5\end{bmatrix}=5\begin{bmatrix}\frac12\\1 \end{bmatrix}$$
so that $$\begin{bmatrix}\frac12\\1 \end{bmatrix}$$ is undisputably an Eigenvector associated to the Eigenvalue $$5$$.
Calculations with whole numbers are easier than fractions, so people often take eigenvectors with whole numbers for convenience.
For example, $$(1/2,1)$$ and $$(1,2)$$ both normalize to the same vector, but the calculations give you $$\left(\frac{1/2}{\sqrt{5/4}},\frac1{\sqrt{5/4}}\right)\text{ and }\left(\frac1{\sqrt5},\frac2{\sqrt5}\right)$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9748211597623861,
"lm_q1q2_score": 0.8778554833475471,
"lm_q2_score": 0.9005297787765764,
"openwebmath_perplexity": 191.53619245914248,
"openwebmath_score": 0.964476466178894,
"tags": null,
"url": "https://math.stackexchange.com/questions/3456797/is-it-acceptable-to-have-a-fraction-in-an-eigenvector"
} |
# Tetrahedron packing in Cube
I'm thinking about following solid geometry problem.
Q: Suppose you have a box of "cube" shape with edge length 1. Then, How many regular tetrahedrons(with edge length 1) can be in the box?
So, this is kind of packing problem inside cube. I guess the answer is 3. but I don't know how to prove 3 is the maximum number. Is there any rigorous way to show this?
Thanks for any help in advance.
• Here's a Wiki article that may be of interest: en.wikipedia.org/wiki/Tetrahedron_packing The results, which are based off experiment and simulation, hint that a 0.7 to 0.85 packing fraction might be reasonable. Maybe higher. Given that your tetrahedra have a $V\approx0.12$, then the answer could be up to $7$! Edit: I say up to seven, since the article does not make it clear when it's considering finite volumes and even then with what sorts of boundaries. Feb 24, 2016 at 2:22
• @SunTaek Yes, I was completely looking at the wrong item in the table -- oops! Feb 24, 2016 at 2:25
• @zahbaz Thanks for interesting article. hmm...but I cannot construct mental picture of 5 or 6 regular tetrahedron in the unit cube... Feb 24, 2016 at 2:27
• @SunTaek. Agreed. I'll stay tuned to this post. This is an interesting problem. Feb 24, 2016 at 2:28
• I can see some ways to pack two tetrahedra in a cube, same edge length. i would be interested in a diagram or calculations that prove that three is possible. Feb 24, 2016 at 18:32
1. "3" is possible, as shown in following diagram.
The vertices of the red tetrahedron are $$\left(\frac12,-\frac12,\frac12\right),\;\; \left(\frac12,-\frac12,-\frac12\right),\;\; \left(\frac{1}{2\sqrt{2}},\frac{1}{2\sqrt{2}},0\right)\;\;\text{ and }\;\; \left(-\frac{1}{2\sqrt{2}},-\frac{1}{2\sqrt{2}},0\right)$$ The green and blue tetrahedrons can be obtained from the red one by rotating it along the $(1,1,1)$ diagonal for $120^\circ$ and $240^\circ$ respectively.
2. I believe "3" is the maximum number. Following is a heuristic argument: | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9843363540453381,
"lm_q1q2_score": 0.877842036501746,
"lm_q2_score": 0.8918110490322426,
"openwebmath_perplexity": 473.71666136887035,
"openwebmath_score": 0.5880131721496582,
"tags": null,
"url": "https://math.stackexchange.com/questions/1669559/tetrahedron-packing-in-cube"
} |
2. I believe "3" is the maximum number. Following is a heuristic argument:
Let's say we have $n$ tetrahedrons inside a cube. There are $\frac{n(n-1)}{2}$ ways of picking a pair of tetrahedron $A, B$ among them.
Pick a point $a$ from $A$, a point $b$ from $B$ such that the distance $|a-b|$ is maximized. No matter how I place $A$ and $B$, I always get $|a - b| \ge 2\sqrt{\frac23} \approx 1.633$.
Since this value is very close to $\sqrt{3} \approx 1.732$, the diameter of the cube, the points $a, b$ will be very close to the two end points of a diagonal. This means each pair of tetrahedron will occupy at least one diagonals of the cube.
Since a cube has $4$ diagonals and it seems impossible for different pairs of tetrahedron to share a diagonal, we find: $$\frac{n(n-1)}{2} \le 4 \implies n \le 3$$
• amazing! rough, but convincing idea. Thank you So much! By the way, may I ask you which program you used to draw that picture? Feb 25, 2016 at 17:48
• @SunTaek I have some script to generate the figure in X3D format, I then use the javascript library x3dom to display and convert it to a picture inside a web browser (firefox). Feb 25, 2016 at 18:06 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9843363540453381,
"lm_q1q2_score": 0.877842036501746,
"lm_q2_score": 0.8918110490322426,
"openwebmath_perplexity": 473.71666136887035,
"openwebmath_score": 0.5880131721496582,
"tags": null,
"url": "https://math.stackexchange.com/questions/1669559/tetrahedron-packing-in-cube"
} |
# How would I evaluate this series using telescopic summation?
The series is $$\frac{1}{2!} + \frac{2}{3!} + \frac{3}{4!} ... + \frac{n-1}{n!},$$ which I can write as the sum $$\sum_{i=2}^n \frac{i-1}{i!}$$ I will try to evaluate the partial sums to look for a pattern. The first partial sums I get are $$\frac12, \frac56 , \frac{23}{24}$$. Thus, I make the guess that the sum is equal to $$\frac{n!-1}{n!}$$. I have already proven the base cases through experimentation, so I work on proving the induction step. I assume that $$\sum_{i=2}^n \frac{i-1}{i!}= \frac{n!-1}{n!}$$, for some $$n=k$$ so I get $$\sum_{i=2}^k \frac{i-1}{i!}= \frac{k!-1}{k!}$$ Now I prove this holds for $$n=k+1$$ as well. I get $$\sum_{i=2}^{k+1} \frac{i-1}{i!}= \frac{k!-1}{k!} + \frac{k}{(k+1)!} = \frac{(k!-1)(k+1)}{(k+1)!} + \frac{k}{(k+1)!} = \frac{(k+1)!-k-1}{(k+1)!} + \frac{k}{(k+1)!} = \frac{(k+1)!-1}{(k+1)!}$$ Thus the induction step holds as well, proving my expression is indeed the sum. However, this problem was in the telescoping sums section of my mathbook, so I was wondering how you would solve this sum telescopically since these induction proofs take some time.
We have:
$$\sum_{i=2}^{n}\frac{i - 1}{i!} = \sum_{i=2}^{n}\frac{i}{i!} -\frac{1}{i!} = \sum_{i=2}^{n}\frac{1}{(i-1)!} - \frac{1}{i!}$$
$$=\bigg(\frac{1}{1!} - \frac{1}{2!}\bigg)+\bigg(\frac{1}{2!} - \frac{1}{3!}\bigg) +\bigg(\frac{1}{3!}-\frac{1}{4!}\bigg)+\dots+\bigg(\frac{1}{(n-1)!}-\frac{1}{n!}\bigg)$$
Telescoping:
$$=\frac{1}{1!}-\frac{1}{n!} = 1- \frac{1}{n!} = \boxed{\frac{n!-1}{n!}}$$
Hint
$$\frac{n-1}{n!}= \frac{1}{(n-1)!}- \frac{1}{n!}$$ and therefore
$$\sum_{k=1}^n \frac{k-1}{k!} = \sum_{k=1}^n \left(\frac{1}{(k-1)!}- \frac{1}{k!}\right) = 1 - \frac{1}{n!}$$ | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9929882056560155,
"lm_q1q2_score": 0.87784057404297,
"lm_q2_score": 0.8840392756357327,
"openwebmath_perplexity": 130.5800285425291,
"openwebmath_score": 0.9912106394767761,
"tags": null,
"url": "https://math.stackexchange.com/questions/4039982/how-would-i-evaluate-this-series-using-telescopic-summation"
} |
# Enumerate with two columns
I'd like to have an enumerate with two columns. The first one report the name of the property and the second one can be a multiline text and it should be indented correctly. Thus second columns' text should follow the document's margin.
Something like this:
\begin{enumerate}
\item[] \textbf{Diagonal}, if all its elements outside the main diagonal are equal to zero, that is $\forall i\neq j$, $a_{ij} = 0$
\item[] \textbf{Scalar}, if all off-diagonal elements are zero and all on-diagonal elements are equal
\item[] \textbf{Identity}, if it's scalar and the elements on its main diagonal are all equal to 1, that is $\forall i$, $a_{ii} = 1$
\item[] \textbf{Lower triangular}, if all the entries above the main diagonal are zero, that is $\forall i > j$, $a_{ij} = 0$
\item[] \textbf{Upper triangular}, if all the entries below the main diagonal are zero, that is $\forall i < j$, $a_{ij} = 0$
\end{enumerate}
Below, a brief summary of the matrix operations used:
\begin{enumerate}
\item[] \textbf{Addition}: If $A$ and $B$ are matrices of the same size then the sum $A$ and $B$ is defined by $C = A + B$, where
$$c_{ij} = a_{ij}+b_{ij} \quad \forall i,j$$
\end{enumerate}
Using leandriis' link, this is what I obtained
"Diagonal" has \quad\quad after it, and I would like to indent all the text in the second column "Scalar" is the normal result. | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9465966762263737,
"lm_q1q2_score": 0.8778390080877045,
"lm_q2_score": 0.9273632901260831,
"openwebmath_perplexity": 638.3671022409804,
"openwebmath_score": 0.8608093857765198,
"tags": null,
"url": "https://tex.stackexchange.com/questions/491118/enumerate-with-two-columns"
} |
• Will the list be longer than a single page? If not, you could use a table for this. – leandriis May 16 '19 at 11:47
• it'd be, actually. It's a list of properties. – JackLametta May 16 '19 at 11:50
• It sounds like you really want a description environment. If you use the enumitem package it is straightforward to set the widest "report name". – Andrew May 16 '19 at 11:56
• Could you please clarify the desired output? Do you want a number, than the name and then the long text or dou you want your list no be unnumbered? – leandriis May 16 '19 at 11:59
• When using a description environment, I don't think that @leandriis would recommend writing \item[] \textbf{Diagonal} (and likewise for the other list items). Instead, you should write \item[Diagonal], etc. – Mico May 16 '19 at 12:41
A longtable environment may be well suited for your typesetting needs.
You may see fit to adjust the width of the second column depending on (a) the width of the first column and (b) the overall width of the text block.
\documentclass{article}
\usepackage{array,longtable,ragged2e}
\newcolumntype{P}[1]{>{\RaggedRight\arraybackslash}p{#1}}
\begin{document}
\noindent
A matrix is said to be
\begin{longtable}{@{} >{\bfseries}l P{0.6\textwidth} @{}}
Diagonal & if all its elements outside the main diagonal are equal to zero, that is $\forall i\neq j$, $a_{ij} = 0$\\
Scalar & if all off-diagonal elements are zero and all on-diagonal elements are equal\\
Identity & if it is scalar and the elements on its main diagonal are all equal to 1, that is, $\forall i$, $a_{ii} = 1$ \\
Lower triangular & if all the entries above the main diagonal are zero, that is, $\forall i > j$, $a_{ij} = 0$ \\
Upper triangular & if all the entries below the main diagonal are zero, that is, $\forall i < j$, $a_{ij} = 0$
\end{longtable} | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9465966762263737,
"lm_q1q2_score": 0.8778390080877045,
"lm_q2_score": 0.9273632901260831,
"openwebmath_perplexity": 638.3671022409804,
"openwebmath_score": 0.8608093857765198,
"tags": null,
"url": "https://tex.stackexchange.com/questions/491118/enumerate-with-two-columns"
} |
\bigskip\noindent
Below, a brief summary of the matrix operations used:
\begin{longtable}{@{} >{\bfseries}l P{0.7\textwidth} @{}}
Addition & If $A$ and $B$ are matrices of the same size then the sum of $A$ and $B$ is defined by $C = A + B$, where
$$c_{ij} = a_{ij}+b_{ij} \quad \forall i,j$$
\end{longtable}
\end{document}
• That's it! But the bold entries are not tabbed. Could you help me with it, please? – JackLametta May 16 '19 at 12:44
• and is it possible to have the same space between the elements that it's present in the document between the rows? – JackLametta May 16 '19 at 12:45
• @JackLametta - Please clarify what you mean by "the bold entries are not tabbed" and " the same space between the elements that it's present in the document between the rows". Thanks. – Mico May 16 '19 at 13:04
• I'd like to have the same interspace that there is between rows of the document also between the element of the longtable. – JackLametta May 16 '19 at 13:05
• @JackLametta - I'm afraid I don't follow you. If the row spacing in the longtable environment is different from that in the rest of your document, it must because you've made some changes to the default line spacing that you haven't told us about so far. – Mico May 16 '19 at 13:31 | {
"domain": "stackexchange.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9465966762263737,
"lm_q1q2_score": 0.8778390080877045,
"lm_q2_score": 0.9273632901260831,
"openwebmath_perplexity": 638.3671022409804,
"openwebmath_score": 0.8608093857765198,
"tags": null,
"url": "https://tex.stackexchange.com/questions/491118/enumerate-with-two-columns"
} |
# Another integral problem
#### paulmdrdo
##### Active member
∫(tan3x/sec2x)dx
this is what i do:
∫(tan3xsec-2x)dx
∫(tan2xtanxsec-1xsec-1x)dx
∫(sec2x-1)tanxsec-1xsec-1x)dx
let u = secx;
du = tanxsecxdx
#### MarkFL
Staff member
Re: another integ problem.
I think my approach would be to rewrite the integrand as follows:
$$\displaystyle \frac{\tan^3(x)}{\sec^2(x)}=\frac{\sin^3(x)}{\cos^3(x)}\cos^2(x)=\frac{-\sin(x)\left(\cos^2(x)-1 \right)}{\cos(x)}$$
Now you should see a $u$-substitution that will work quite nicely.
#### paulmdrdo
##### Active member
Re: another integ problem.
I think my approach would be to rewrite the integrand as follows:
$$\displaystyle \frac{\tan^3(x)}{\sec^2(x)}=\frac{\sin^3(x)}{\cos^3(x)}\cos^2(x)=\frac{-\sin(x)\left(\cos^2(x)-1 \right)}{\cos(x)}$$
Now you should see a $u$-substitution that will work quite nicely.
i used that technique makfl and i get the right answer. but for educational purposes i want to know another way of solving that.
this what i do a while ago.
∫(tan3x/sec2x)dx
∫(tan2xtanx/sec2x)dx
∫(sec2x-1)tanx)/sec2x)dx
∫(sec2xtanx-tanx)/sec2x)dx
∫[(sec2xtanx)/sec2x - tanx/sec2x]dx
∫tanxdx - ∫(tanx/sec2x)dx
ln|secx| - ∫(sinx/cosx*cos2x)dx
ln|secx| - ∫sinxcosxdx
u= sinx; du = cosxdx
ln|secx| - ∫udu
ln|secx| - u2/2
ln|secx| - sin2x/2 + C
is my solution correct..it is different with the one i get when i used the technique you suggested.
#### MarkFL
Staff member
Re: another integral problem.
Yes, your solution is also correct, and many times when we find differing forms for an indefinite integral, we find that they (without the constant of integration) differ only by a constant, which of course is allowed.
So, let's look at the two solutions without the constants:
(1) $$\displaystyle \frac{1}{2}\cos^2(x)-\ln|\cos(x)|$$
(2) $$\displaystyle \ln|\sec(x)|-\frac{1}{2}\sin^2(x)$$
First, we should observe that:
$$\displaystyle \ln|\sec(x)|=\ln|(\cos(x))^{-1}|=-\ln|\cos(x)|$$ | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006256,
"lm_q1q2_score": 0.8778216698475514,
"lm_q2_score": 0.8991213799730775,
"openwebmath_perplexity": 511.816133713477,
"openwebmath_score": 0.9638364911079407,
"tags": null,
"url": "https://mathhelpboards.com/threads/another-integral-problem.5446/"
} |
First, we should observe that:
$$\displaystyle \ln|\sec(x)|=\ln|(\cos(x))^{-1}|=-\ln|\cos(x)|$$
So, if we subtract one solution from the other, we should obtain a constant. Subtracting (2) from (1), we get:
$$\displaystyle \frac{1}{2}\cos^2(x)+\frac{1}{2}\sin^2(x)$$
Using a Pythagorean identity, we now have:
$$\displaystyle \frac{1}{2}$$
So, we see that the two solutions differ by a constant, which means they are equivalent as an anti-derivative.
Perhaps a simpler way to look at it is to take the solution you obtained, and rewrite it:
$$\displaystyle \ln|\sec(x)|-\frac{1}{2}\sin^2(x)+C=-\ln|\cos(x)|-\frac{1}{2}\left(1-\cos^2(x) \right)+C=\frac{1}{2}\cos^2(x)-\ln|\cos(x)|+\left(C-\frac{1}{2} \right)$$
Since an arbitrary constant less one half, is still an arbitrary constant, we get:
$$\displaystyle \frac{1}{2}\cos^2(x)-\ln|\cos(x)|+C$$
#### paulmdrdo
##### Active member
Re: another integral problem.
Yes, your solution is also correct, and many times when we find differing forms for an indefinite integral, we find that they (without the constant of integration) differ only by a constant, which of course is allowed.
So, let's look at the two solutions without the constants:
(1) $$\displaystyle \frac{1}{2}\cos^2(x)-\ln|\cos(x)|$$
(2) $$\displaystyle \ln|\sec(x)|-\frac{1}{2}\sin^2(x)$$
First, we should observe that:
$$\displaystyle \ln|\sec(x)|=\ln|(\cos(x))^{-1}|=-\ln|\cos(x)|$$
So, if we subtract one solution from the other, we should obtain a constant. Subtracting (2) from (1), we get:
$$\displaystyle \frac{1}{2}\cos^2(x)+\frac{1}{2}\sin^2(x)$$
Using a Pythagorean identity, we now have:
$$\displaystyle \frac{1}{2}$$
So, we see that the two solutions differ by a constant, which means they are equivalent as an anti-derivative.
Perhaps a simpler way to look at it is to take the solution you obtained, and rewrite it: | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006256,
"lm_q1q2_score": 0.8778216698475514,
"lm_q2_score": 0.8991213799730775,
"openwebmath_perplexity": 511.816133713477,
"openwebmath_score": 0.9638364911079407,
"tags": null,
"url": "https://mathhelpboards.com/threads/another-integral-problem.5446/"
} |
Perhaps a simpler way to look at it is to take the solution you obtained, and rewrite it:
$$\displaystyle \ln|\sec(x)|-\frac{1}{2}\sin^2(x)+C=-\ln|\cos(x)|-\frac{1}{2}\left(1-\cos^2(x) \right)+C=\frac{1}{2}\cos^2(x)-\ln|\cos(x)|+\left(C-\frac{1}{2} \right)$$
Since an arbitrary constant less one half, is still an arbitrary constant, we get:
$$\displaystyle \frac{1}{2}\cos^2(x)-\ln|\cos(x)|+C$$
i just want to ask how is ln|secx| = -ln|cosx|... the rest of explanation is enligthening. thanks a lot!
#### MarkFL
Staff member
Re: another integral problem.
Recall the logarithmic property:
$$\displaystyle \log_a\left(b^c \right)=c\cdot\log_a(b)$$
and the definition:
$$\displaystyle \sec(x)\equiv\frac{1}{\cos(x)}=(\cos(x))^{-1}$$
#### soroban
##### Well-known member
Re: another integ problem.
Hello, paulmdrdo!
The integral $$\int \sin x\cos x\,dx$$ is famous
for having different (but equivalent) answers.
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
$$1.\: \int \sin x(\cos x\,dx)$$
Let $$u \,=\,\sin x \quad\Rightarrow\quad du \,=\,\cos x\,dx$$
Substitute: .$$\int u\,du \:=\:\tfrac{1}{2}u^2+C$$
Back-substitute: .$$\tfrac{1}{2}\sin^2x + C$$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
$$2.\;\int \cos x(\sin x\,dx)$$
Let $$u = \cos x \quad\Rightarrow\quad du = \text{-}\sin x\,dx \quad\Rightarrow\quad \sin x\,dx = \text{-}du$$
Substitute: .$$\int u(\text{-}du) \:=\:\text{-}\int u\,du \:=\:\text{-}\tfrac{1}{2}u^2+C$$
Back-substitute: .$$\text{-}\tfrac{1}{2}\cos^2x + C$$
~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
$$3.\;\int\sin x\cos x\,dx \:=\:\tfrac{1}{2}\int2\sin x\cos x\,dx$$
. . . $$=\;\tfrac{1}{2}\int\sin2x\,dx \:=\:\text{-}\tfrac{1}{4}\cos2x + C$$ | {
"domain": "mathhelpboards.com",
"id": null,
"lm_label": "1. YES\n2. YES",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.9763105287006256,
"lm_q1q2_score": 0.8778216698475514,
"lm_q2_score": 0.8991213799730775,
"openwebmath_perplexity": 511.816133713477,
"openwebmath_score": 0.9638364911079407,
"tags": null,
"url": "https://mathhelpboards.com/threads/another-integral-problem.5446/"
} |
Latex Vector Notation | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
First put the following in your preamble (text copyable below the colored stuff):. Every command has a specific syntax to use. This will always be the case when we are dealing with the contours of a function as well as its gradient vector field. Usually you need to mark which Pawn is being captured, but ignore this for sake of simplicity. LaTeX tutorial using Texmaker. The indefinite integral is commonly applied in problems involving distance, velocity, and acceleration, each of which is a function of time. If the TeX Notation filter is activated, which set a LaTeX renderer, the same equation as above is obtained with the following control sequence:. It is important to keep them in a vector form so they can viewed or printed at any resolution without loss of quality. It also shows how to write a unit vector - the arrow that goes on the top of the letters representing the vector. or in abbreviated vector notation where u is the velocity vector and ∇. The main difference between the various types of matrix is the kind of delimeters that surround them. Basically, it is a $\LaTeX$ handwritten symbol recognition. Scroll down the page for examples and solutions. Compute answers using Wolfram's breakthrough technology & knowledgebase, relied on by millions of students & professionals. (1)Pisto des (1988): \Algebra. A matrix is a two-dimensional array of values that is often used to represent a linear transformation or a system of equations. Retrieved from "http://ufldl. The arrow vector notation is the standard in LaTeX, LaTeX Vectors With Hats. MATLAB recognizes vector operations if we use the vector notation. I am not 100% sure, but this is associated in my memory with J. Sum-class symbols, or accumulation symbols, are symbols whose sub- and superscripts appear directly below and above the symbol rather than beside it. Vector Paint is a drawing program, with a simple yet powerful interface, that lets you draw points, lines, curves and shapes. In L a T e X, subscripts and | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
interface, that lets you draw points, lines, curves and shapes. In L a T e X, subscripts and superscripts are written using the symbols ^ and _, in this case the x and y exponents where written using these codes. Using the Hadamard product, we can write the expression as. Unit vector: \vec { [1] } The documentation for Google Docs Equation editor (based on the Google Chat API) is not really extensive so most of the time the CodeCogs Online LaTex Equation Editor is the place to start and test if a LaTex expression from that editor also works in the Google Docs Equation Editor; they also have a link to better. One of the interesting things I noticed in the article is that the students prefer to type up their homework using LaTeX. Special Matrices and Matrix Properties. What is the usual way to do this? Of course, I think it would be best to state my notation somewhere in the beginning of paper. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. For non-Greek stuff, see below. I have thought of \left( \stackrel{n}{r} \right), but the effect is obviously ugly. Special matrices are represented by special notation. linear algebra or $X,Y$ in e. Notation: We often represent a vector by some letter, just as we use a letter to denote a scalar (real number) in algebra. Vector notation is a commonly used mathematical notation for working with mathematical vectors, which may be geometric vectors or members of vector spaces. Used to be that all vectors would be bold-face and unit vectors would be denoted by the hat as well if you were to write it in LaTeX (for example) you used to have to write \hat{\vec{r}} with the \vec{r} giving you the boldface. Here, the vector notation, models the phenotypes of all the individuals in the dataset, denoted as a column vector. I have not been able to find a resource to tell me the standard notation | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
denoted as a column vector. I have not been able to find a resource to tell me the standard notation for a normalized scalar value. Macros are. b) Given two points P; Q, the vector from P to Q is denoted PQ. This is not a comprehensive list. com Knowledge base dedicated to Linux and applied mathematics. Typesetting mathematics is one of LaTeX's greatest strengths. If one of the vector is identity vector, then the result is the sum of all the elements in the other one. Notation in which you express the x component as i and the y component as j, and you add them. The notation is sometimes more efficient than the conventional mathematical notation we have been using. Denote by the probability of an event. LaTeX Source of Example 1. \end{document} (Note that this is not to be taken as an example of good mathematical exposition. The Wolfram Language has the world's largest collection of consistent multifont mathematical notation characters$LongDash]all fully integrated into both typesetting and symbolic expression construction. Basically if a number is bigger than 10^4 or smaller than 10^{-4} (applies to the absolute values of negative numbers too), it will be denoted in scientific notation. The main difference between the various types of matrix is the kind of delimeters that surround them. Special Matrices and Matrix Properties. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. I am trying to understand the Matrix and Vector Notations on page 2 here: (the page is also pasted below, to make it easier to explain the problem). The Comprehensive LATEX Symbol List Scott Pakin ∗ 8 October 2002 Abstract This document lists 2590 symbols and the corresponding LATEX commands that produce them. * y, in numpy x*y), producing a new vector of same. since I am writing blog post that hosted by Github with Editor Atom , and use plugin | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
vector of same. since I am writing blog post that hosted by Github with Editor Atom , and use plugin markdown-preview-plus and mathjax-wrapper , and use mathjax Javascript display the math symbols on the web page. This week, we will go into some of the heavier. The Markdown parser included in the Jupyter Notebook is MathJax-aware. No - as the wikipedia article (see link above) points out there is no standard (i. How to Enter Answers in WeBWorK Be careful entering powers of trigonometric, and other, functions. php/Backpropagation_Algorithm". In certain cases it may be desirable to include “normal text” within an equation. So are 3*4 and 3 4 (3 space 4, not 34) but using an explicit multiplication symbol makes things clearer. LaTeX representation of hollow "R" symbol for real space? Post by clayton » Wed May 19, 2010 8:33 pm In LaTeX, how do I represent the hollow "R" symbol that designates the real number space?. \endgroup – KCd Apr 17 at 8:04. In the discussion of the applications of the derivative, note that the derivative of a distance function represents instantaneous velocity and that the. I have created a five video YouTube playlist Geometric Calculus, about 53 minutes in all, taken from the book. Again, the effect of the th variant on the phenotype is , the mean is , and the contribution of the environment on the phenotype is denoted by. I am not 100% sure, but this is associated in my memory with J. how the components of a tensor (in the above example, the tensor components would be the σij) transform under a change of reference frame. Tilde notation. In the following document, we will refer to special characters for all symbols other than the lowercase letters a-z, uppercase letters A-Z, figures 0-9, and English punctuation marks. The element-wise squaring makes the vector notation a bit more obscure in terms of everyday linear algebra operators. \left and \right can dynamically adjust the size, as shown by the next example:. This list of mathematical | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
and \right can dynamically adjust the size, as shown by the next example:. This list of mathematical symbols by subject shows a selection of the most common symbols that are used in modern mathematical notation within formulas, grouped by mathematical topic. Notice that to insert the parentheses or brackets, the \left and \right commands are used. The derivative of a real function f may be indicated with differential notation or simply as f ′. If one of the vector is identity vector, then the result is the sum of all the elements in the other one. , integrals containing more than one integral sign) one finds that LaTeX puts too much space between the integral signs. If your document requires only a few simple mathematical formulas, plain LaTeX has most of the tools that you will need. \endgroup – Edward Xu Mar 14 at 18:14. De nition 1 (Naive De nition of a Set). 21 Sep 11 – fixed some typos and the vector notation 22 Sep 11 – fixed import of sklearn according to the new 0. Its done! Actually, the default interpreter in MATLAB for legend is 'tex', I guess. It all begins by writing the inner product. Scientific notation in LaTex? Hi, im engineering student therefore using allot of scientific notations. For example (1+2)* (3+4) and (1+2) (3+4) are both valid. functional analysis. This post highlights vector calculus and vector analysis. Software implementation Edit Plate notation has been implemented in various TeX / LaTeX drawing packages, but also as part of graphical user interfaces to Bayesian statistics programs such as BUGS and BayesiaLab. If A is a complex number a+bί, then A+1 returns a + 1 + bί. This supports my suspicion that you should check whether your LaTeX installation works. For the posted code, you can achieve this by using Part. Is a math Book. Tensor products of vector spaces are to Cartesian products of sets as direct sums of vectors spaces are to disjoint unions of sets. Specify vectors in Cartesian or polar coordinates, and see the magnitude, | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
disjoint unions of sets. Specify vectors in Cartesian or polar coordinates, and see the magnitude, angle, and components of each vector. -10 -5 0 5 10 -10 -5 0 5 10 -0. But let me go over the different ways you could represent a vector. This leaflet provides information on symbols and notation commonly used in mathematics. In Unicode , it is the character at code point U+2207, or 8711 in decimal notation. We write $$\sim g(n)$$ to represent any quantity that, when divided by $$f(n)$$, approaches $$1$$ as $$n$$ grows. How to Enter Answers in WeBWorK Be careful entering powers of trigonometric, and other, functions. Our aim in this subsection is to give you a storehouse of examples to work with, to become comfortable with the ten vector space properties and to convince you that the multitude of examples justifies (at least initially) making such a broad definition as Definition VS. the weight of the car times the coefficient of kinetic friction. The Vector class implements vector quantities in $${\bf R}^n$$ for arbitrary $$n$$. VECTOR CALCULUS: USEFUL STUFF Revision of Basic Vectors A scalar is a physical quantity with magnitude only A vector is a physical quantity with magnitude and direction A unit vector has magnitude one. Symbols for Preference Relations Unicode Relation Hex Dec Name LAΤΕΧ ≻ U+227b 8827 SUCCEEDS \succ Strict Preference P U+0050 87 LATIN CAPITAL LETTER P P > U+003e 62 GREATER-THAN SIGN. Summary: Possibilities for the Solution Set of a System of Linear Equations Problem 288 In this post, we summarize theorems about the possibilities for the solution set of a system of linear equations and solve the following problems. Hi, What mathematical symbol is the one where it has a cross in a circle? Is it just multiplication? I've never seen it before. And, yes, it turns out that \curl \dlvf is equal to \nabla \times \dlvf. Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Ask Question Asked 4 years, 1 month ago. It | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
Stack Overflow! Please be sure to answer the question. Ask Question Asked 4 years, 1 month ago. It also shows how to write a unit vector - the arrow that goes on the top of the letters representing the vector. I realized that I didn't answer the question. Equation 30-3 gives Bself = µ 0I=2a and B other = µ 0Ia 2=2(a 2 +x2)3=2. How to write vector equation in Word Wide Spectrum. \begingroup Every time I have seen that notation used and unexplained, I've been confused by it. Some examples from the MathJax demos site are reproduced below, as well as the Markdown+TeX source. It is important to keep them in a vector form so they can viewed or printed at any resolution without loss of quality. However, instead of measuring this distance on the number line, a complex number's absolute value is measured on the complex number plane. Notice that the vectors of the vector field are all orthogonal (or perpendicular) to the contours. LaTeX is capable of displaying any mathematical notation. How can I pick up the argmin of a vector? I. lecture1_2 - Free download as PDF File (. But get G M_1 bold as well = bad. The way the curly bracket is facing indicates the direction of the hug. This one is a tricky one, you need to use the (surprisingly powerful) Microsoft Equation Editor which should be under the insert tab. In this section we will give a brief review of matrices and vectors. 870 Ct VERY RARE UNHEATED NR' CEYLON BLUE SAPPHIRE ROSE CUT NO RESERVE PRICE. The curl, on the other hand, is a vector. , 1 \times 10^{-2} or 4 \times 10^{-35}. \begingroup Every time I have seen that notation used and unexplained, I've been confused by it. Thanks mates, But I could not get the response , how do I use vector notation, I am not more familiar with maths notations. @duffymo Regardless of how you thing of LaTeX, this is a pretty good question. We use tilde notation to develop simpler approximate expressions. No installation, real-time collaboration, version control, hundreds of LaTeX | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
expressions. No installation, real-time collaboration, version control, hundreds of LaTeX templates, and more. Notation in econometrics: a proposal for a standard 77 he means (5 + √ −15)(5 − √ −15)= 25 − (−15)= 40, see Kline (1972, p. Integral expression can be added using the \int_{lower}^{upper} command. use the following search parameters to narrow your results: subreddit:subreddit find submissions in "subreddit" author:username find submissions by "username" site:example. Asking for help, clarification, or responding to other answers. The frequently used left delimiters include (, [ and {, which are obtained by typing (, [and \{respectively. Basic LaTeX Julie Mitchell This resource was adapted from notes provided by Jerry Marsden 1 Basic Formatting 1. I dont think you are talking about f' for deeivative of f. Visit the Learning Center. Note: LaTeX is case sensitive. In conjunction with the previous tutorial on math, by the end of the session, you will be in pretty good shape to write almost anything that your work will require. 5 (d) 8 (e) 15. The notation is sometimes more efficient than the conventional mathematical notation we have been using. Basics of LaTeX for scientific papers and reports1 Sneˇzana Stanimirovi´c, November 21, 2016 1. Vector notation is a written method for representing quantities that possess both direction and magnitude, such as acceleration. Also, I would like a discussion of how this was developed to be able to express physics/engineering equations independently of the coordinate system. the normal force of the road times the coefficient of static friction. For example, a standard integral in LaTeX looks like \int_a^b \! f(x) \, \mathrm{d}x. But once you have it broken up into the x and y components, you can just separately add the x and y components. Matrix Calculator. Retrieved from "http://ufldl. inequality symbols in math equality symbols math equal sign vector icon equality sign mathematical sum symbol stock vector equality | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
symbols math equal sign vector icon equality sign mathematical sum symbol stock vector equality mathematical. or in abbreviated vector notation where u is the velocity vector and ∇. In this paper we attempt to harmonize the various practices in econometrics notation. It also shows how to write a unit vector - the arrow that goes on the top of the letters representing the vector. The 18th and 19th centuries saw the creation and standardization of mathematical notation as used today. uk 1994/09/16 Abstract This package provides a set of new commands for representing vectors in various ways. 3 posts • Page 1 of 1. The second vector arrow above the symbol is substantially larger and it does not look good, especially when compared to the TeX/LaTeX result. Every nonzero vector has a corresponding unit vector, which has the same direction as that vector but a magnitude of 1. Dot notation for time derivatives (e. Our aim in this subsection is to give you a storehouse of examples to work with, to become comfortable with the ten vector space properties and to convince you that the multitude of examples justifies (at least initially) making such a broad definition as Definition VS. Similarly, \R^2 is a two-dimensional vector, and \R^3 is a three-dimensional vector. 5 How do you look at any of these coordinate systems and determine. The French Talbot company was reorganised by Anthony Lago (1893-1960) and after that, the Talbot-Lago name was used but on the home market the cars bore a Talbot badge. Typically this is the LaTeX code for the symbol. Calculates transpose, determinant, trace, rank, inverse, pseudoinverse, eigenvalues and eigenvectors. That list also includes LaTeX and HTML markup, and Unicode code points for each symbol (note that this article doesn't have the latter two, but they could certainly be added). You write (sin(t))^2 for the square of sin(t), and never sin^2t. Latex Bold Vector. Three Styles for LaTeX Vector Notation LaTeX Vector With an Arrow. However, | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
Latex Bold Vector. Three Styles for LaTeX Vector Notation LaTeX Vector With an Arrow. However, instead of measuring this distance on the number line, a complex number's absolute value is measured on the complex number plane. As you will see, these behave in a fairly predictable manner. In vector addition, the zero vector is the additive identity vector: v + O = v. You can get the same file with more text here. You can choose to load either of them: \usepackage{amsfonts} % or \usepackage{amssymb}. We've documented and categorized hundreds of macros!. In this chapter we will tackle matters related to input encoding, typesetting diacritics and special characters. For Greek letters, put \boldsymbol in front of the Greek letter and you'll get the bold vector notation. 5 How do you look at any of these coordinate systems and determine. Latex-Math-Snippets. The normalized vector of is a vector in the same direction but with norm (length) 1. On a mistake, update as follows:. Thus, for example, the multiple integral is obtained by typing. Using R Markdown for Class Reports. Topics include: limits, integrals, summation notation, and vectors. It further allows the same raising and lowering operators to be used for many different roles according to the term they apply to. since I am writing blog post that hosted by Github with Editor Atom , and use plugin markdown-preview-plus and mathjax-wrapper , and use mathjax Javascript display the math symbols on the web page. Thanks mates, But I could not get the response , how do I use vector notation, I am not more familiar with maths notations. This guide provides an overview of how to get started with LaTeX, as well as resources and exercise to help new users of the program. For example, if you type \sqrt2 and click this icon, you'll get 2 in your document without opening MathType. For math, science, nutrition, history. Here is how LaTeX typesets the above source file. Vectors are elements of a vectorspace, depending on context they | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
typesets the above source file. Vectors are elements of a vectorspace, depending on context they are commonly called $V,W$ in e. I have read the vector examples page on Wolfram Alpha's homepage, but I didn't know which method to use. Easy Scientific Notation In LaTeX filed in LaTeX , Math , Physics on Mar. Notebook documents ¶ Notebook documents contains the inputs and outputs of a interactive session as well as additional text that accompanies the code but is not meant for execution. This is a repository of latex snippets for sublime. But MathJax can also be configured to use HTML-CSS (for legacy browsers), SVG, and native MathML rendering when available in a browser. We generally use the coordinates x, y, and z to locate a particle at point P(x, y, z) in three dimensions. There is a shorthand for the last two commands: if you are using colon notation to access elements of a vector, you can use the end command to denote the end of the vector. As you see, the way the equations are displayed depends on the delimiter, in this case \[$ and . Unit vector: \vec { [1] } The documentation for Google Docs Equation editor (based on the Google Chat API) is not really extensive so most of the time the CodeCogs Online LaTex Equation Editor is the place to start and test if a LaTex expression from that editor also works in the Google Docs Equation Editor; they also have a link to better. Recall the notation that $\R$ stands for the real numbers. As does the notation $\mathbf i, \mathbf j, \mathbf k$ for the standard basis vectors in $\mathbf R^3$. The Ipe extensible drawing editor is a free vector graphics editor for creating figures in PDF or EPS format. It's possible to typeset integrals, fractions and more. , integrals containing more than one integral sign) one finds that LaTeX puts too much space between the integral signs. function , latex. Sum-class symbols, or accumulation symbols, are symbols whose sub- and superscripts appear directly below and above the symbol rather | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
symbols, are symbols whose sub- and superscripts appear directly below and above the symbol rather than beside it. This is the 2nd post in the series. Equation 30-3 gives Bself = µ 0I=2a and B other = µ 0Ia 2=2(a 2 +x2)3=2. Vector notation is a commonly used mathematical notation for working with mathematical vectors, which may be geometric vectors or members of vector spaces. ˙, ¨) can be obtained by following a letter variable with "\dot" for a first derivative and "\ddot" for a second derivative. As it is virtually impossible to list all the symbols ever used in mathematics, only those symbols which occur often in mathematics or mathematics education are. Recall Ax = Acos2 and Ay = Asin2. 14 \times 10^5$or 3. Vector notation was introduced to physics in the end of 19-th century. ISO standard) notation. You might want to look at a few careful expositions to get a sense of the normal range of notational variation. NET 3d advocacy AMD64 asdf billboard blogging Books cluster code dave winer essay example fix Flash fox and geese game glfw graphics haskell Humor KPAX LaTeX LaTeX vector notation life Linux Mathcad monads Neal Stephenson opengl OSS Papervision3D Physics Pizza Hut puppet repa SBCL scientific notation sci fi SLIME thesis vector whedon Wine wxCL. Calculations. Problem: For equation (2), I think it should b. When you then click on the blue downarrow at the lower right, five options appear. Vectors are a very important concept in science and math and appear very early in calculus and physics classes in college or in advanced high school classes. When the currents are in the same directions, the fields are parallel and oB s= B elf +B ther. Assuming w=f(x,y,z) and u=, we have Hence, the directional derivative is the dot product of the gradient and the vector u. If A is a complex number a+bί, then A+1 returns a + 1 + bί. As an undergraduate, I clearly remember learning and using "hat notation" to describe unit vectors. Latex-Math-Snippets. Viewed 10k times 7. | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
learning and using "hat notation" to describe unit vectors. Latex-Math-Snippets. Viewed 10k times 7. This is an index-notation question rather then the NS one: For incompressible flow and Newtonian fluid, the continuity equation is denoted with: $$\frac{\partial u_i}{\partial x_i} = 0,$$ which. Sign up to join this community. How do you represent vectors. How to write vector equation in Word Wide Spectrum. With the x-axis due east and the y-axis due north, what is the displacement in unit vector notation for the bird?. 1/2 (c) 2 2 (d) 1 0 0. , integrals containing more than one integral sign) one finds that LaTeX puts too much space between the integral signs. “Save as new equation…” allows you to keep the equation as a building block, which makes it available from the “Insert” ribbon. Tilde notation. Thus, for example, the multiple integral is obtained by typing. 8 m/s2 and ay = -2. LaTeX code for combination? aside from the conventional${_n}C_r$, how can I input "n taken r" using the more common parenthesis notation. Putting a bar or a tilde over a letter in LaTeX. We write $$\sim g(n)$$ to represent any quantity that, when divided by $$f(n)$$, approaches $$1$$ as $$n$$ grows. the weight of the car times the coefficient of kinetic friction. \documentclass{article} \usepackage{amsmath} \begin{document} Let$\boldsymbol\alpha$be a vector. Subsection EVS Examples of Vector Spaces. A LaTeX command begins with the command name, which consists of a \ followed by either (a) a string of letters or (b) a single non-letter. Can we get something like this going on Stack Overflow? I think it'd be appropriate as I at least. \end{document} (Note that this is not to be taken as an example of good mathematical exposition. Problem: For equation (2), I think it should b. [email protected]. Windows applications that create vector graphics (such a graphing and diagramming tools) usually allow you to export graphics in either the Encapsulated Postscript (EPS) format or as a Windows | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
allow you to export graphics in either the Encapsulated Postscript (EPS) format or as a Windows metafile (EMF or WMF). To find the unit vector u of the vector you divide that vector by its magnitude as follows: Note that this formula uses scalar multiplication, because the numerator is a vector and the denominator […]. How do you represent vectors. Online WYSIWYG Mathematics Editor (Equation Editor, Latex Editor), fast and powerful Editing features, inputting Normal text, Math symbols, and drawing Graph/Diagram in one single editor, help writing Math Document much easier. The direction of a vctor V is the unit vector U parallel to V: U = V j V. The FontName, FontWeight, and FontAngle properties do not have an effect. There is no doubt that the development of good notation has been of great importance in the history of mathematics. – “Toggle between TeX/LaTeX and MathType equations” (not available on the Mac) – This is a huge shortcut if you know the TeX language. It allows you to specify a variable for the offset, but the width must be constant. When you reference a vector with a colon, such as v (:), all the components of the vector are listed. com Knowledge base dedicated to Linux and applied mathematics. Number sets such as natural numbers or complex numbers are not provided by default by LaTeX. news & information AoPS News AoPS Wiki. Home > Latex > FAQ > Latex - FAQ > How to write a vector in Latex ? \vec,\overrightarrow. A free-body diagram is a special example of the vector diagrams that. The result of adding 11 km, north plus 11 km, east is a vector with a magnitude of 15. As you will see, these behave in a fairly predictable manner. We use tilde notation to develop simpler approximate expressions. As it is virtually impossible to list all the symbols ever used in mathematics, only those symbols which occur often in mathematics or mathematics education are. Question: Q: Physics font-vector notation I'm using Keynote in my Grade 11 physics class. of design | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
Question: Q: Physics font-vector notation I'm using Keynote in my Grade 11 physics class. of design science. 1/2 (b) 1/2. How can I code in R to get such regular scientific notation format as the xtable output?. Latex-Math-Snippets. Is it possible to tell in index notation whether a vector is a row or column vector, or is that supposed to be clear based on context?. Equation 30-3 gives Bself = µ 0I=2a and B other = µ 0Ia 2=2(a 2 +x2)3=2. † as before, open WinEdt and write the following: \documentclass. In a vector such as a=[2 3 1 4 5], I want to pick up 1 by min(a) and also want to have 3 that is the Nth element of this vector with the minimum 1. It could be either a row vector or a column vector. Normalized vectors (i. Performs LU, Cholesky, QR, Singular value. , while the elements of a set will usually be given lower-case letters, like x, y, z, v, etc. The ability to easily include mathematical notation within markdown cells using LaTeX, and rendered natively by MathJax. Two arguments for addition taking precedence over (being done before) the max or min: In a max-plus algebra the addition plays the role of multiplication, and is denoted as such, while the$\max$plays the role of addition and is denoted as such thus since multiplication takes precendce over addition this translates to addition taking precedence over$\max$; see Max-plus algebra. Topics include: limits, integrals, summation notation, and vectors. Whether you've loved the book or not, if you give your honest and detailed thoughts then people will find new books that are right for them. By relieving the brain of all unnecessary work, a good notation sets it free to concentrate on more advanced problems, and, in effect, increases the mental power of the race. clude annotation such as In the history of mathematics, these symbols have denoted numbers, shapes, patterns, and change. Also let’s auto-matically scale all examples x to have (Euclidean) length 1, since this doesn’t affect which side of the plane | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
scale all examples x to have (Euclidean) length 1, since this doesn’t affect which side of the plane they are on. This is the 2nd post in the series. An online LaTeX editor that's easy to use. 0 m and b =-13. Our aim in this subsection is to give you a storehouse of examples to work with, to become comfortable with the ten vector space properties and to convince you that the multitude of examples justifies (at least initially) making such a broad definition as Definition VS. I realized that I didn't answer the question. The length is denoted j V. Three vector approach. Sign up to join this community. But get G M_1 bold as well = bad. So can be viewed as the imanginary part of. In unit-vector notation, what is the velocity of the cart when it reaches its greatest y coordinate? - Slader A cart is propelled over an xy plane with acceleration components ax = 4. \documentclass{article} \usepackage{amsmath} \begin{document} Let$\boldsymbol\alpha$be a vector. 1 Compute the lengths of the following vectors: (a) 0 0. An "overdot" is a raised dot appearing above a symbol most commonly used in mathematics to indicate a derivative taken with respect to time (e. Pos tentang vector notation latex yang ditulis oleh blogkarinagoo. But MathJax can also be configured to use HTML-CSS (for legacy browsers), SVG, and native MathML rendering when available in a browser. You cannot avoid mathematical notation when reading the descriptions of machine learning methods. Note, that integral expression may seems a little different in inline and display math mode - in inline mode the integral symbol and the limits are compressed. Normalized vectors (i. set margin latex latex matrices First the basic environments which could be used for a matrix, all of them are provide by usepackage amsmath. Once you're in equation mode, you can mess around with the GUI and try to look for it, or just type: (abc)/vec The / you might recognize from latex, it works usually the same here, it indicates a keyword is | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
The / you might recognize from latex, it works usually the same here, it indicates a keyword is about to happen, and it will apply that operation to. Let $$X$$ be the stochastic process described by this chain (remember, a stochastic process is just a random variable that evolves through time). The matrix environments are matrix, bmatrix, Bmatrix, pmatrix, vmatrix, Vmatrix, and smallmatrix. In vector addition, the zero vector is the additive identity vector: v + O = v. It is a sequel to my Geometric Algebra playlist. Anyone who works with LaTeX knows how time-consuming it can be to find a symbol in symbols-a4. Associated with this quantity is the general relationship and when the Lagrangian is invariant with respect to time translation the energy will be a conserved quantity (and also the Hamiltonian). You have to use parentheses; it will not accept "<2,-3>" notation. A more complete primer can be found here. Currently to get for example 2x10 -3 i am typing as 2 \times 10 {-3}. We use tilde notation to develop simpler approximate expressions. ,$1 \times 10^{-2}$or$4 \times 10^{-35}$. inequality symbols in math equality symbols math equal sign vector icon equality sign mathematical sum symbol stock vector equality mathematical. The result of adding 11 km, north plus 11 km, east is a vector with a magnitude of 15. (4) Potential. Displacement Vector. A vector of length one is said to be a unit vector. 1 Vectors and vector notation 355B Guided practice worksheet 4 Using Resource sheet 18. This chapter has shown many examples using subscript notation and range variables, Chapter 10, "Vectors and Matrices," showed many examples using vector notation without subscripts. The derivative of a real function f may be indicated with differential notation or simply as f ′. Maybe you are talking about the del operator for gradient, divergence, curl kind of things in physics or differential geometry then it is \nalba in LaTeX math mode. The$ 's around a command mean that it has to | {
"domain": "monetimargherita.it",
"id": null,
"lm_label": "1. YES\n2. YES\n\n",
"lm_name": "Qwen/Qwen-72B",
"lm_q1_score": 0.976310532836284,
"lm_q1q2_score": 0.8778216656487156,
"lm_q2_score": 0.8991213718636754,
"openwebmath_perplexity": 751.4959527028767,
"openwebmath_score": 0.9481537938117981,
"tags": null,
"url": "http://chwz.monetimargherita.it/latex-vector-notation.html"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.