Determinants

If the matrix A in (1) is a square matrix, then we associate with A a number denoted by

\displaystyle \Delta = \left| \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{an} \\  a_{21} & a_{22} & \cdots & a_{2n} \\  \cdots & \cdots & \cdots & \cdots \\  a_{n1} & a_{n2} & \cdots & a_{nn} \end{array} \right|\cdots (9)

called the determinant of A of order n, written det(A). In order to define the value of a determinant, we introduce the following concepts.

1. Minor

Given any element a_{jk} of \Delta we associate a new determinant of order (n – 1) obtained by removing all elements of the jth row and kth column called the minor of a_{jk}.

2. Cofactor

If we multiply the minor of a_{jk} by (-1)^{j+k}, the result of the elements in any row [or column] by their corresponding cofactors and is called the Laplace expansion. In symbols,

\displaystyle \det{A} = \sum^{n}_{k=1}a_{jk}A_{jk} \cdots (10)

We can show that this value is independent of the row [or column] used.

行列式

 仮に (1) における行列 A が正方行列なら, A に対して下記に示すある数を関連付けられます.

\displaystyle \Delta = \left| \begin{array}{cccc} a_{11} & a_{12} & \cdots & a_{an} \\  a_{21} & a_{22} & \cdots & a_{2n} \\  \cdots & \cdots & \cdots & \cdots \\  a_{n1} & a_{n2} & \cdots & a_{nn} \end{array} \right|\cdots (9)

これは n次A行列式 と呼び, det(A) と記述します.行列式の値を定義するために次の概念を導入しましょう.

1. 小行列式

\Delta の任意の要素 a_{jk} がある時, j 番目の行および k 番目の列の全要素を除去して得られた (n – 1) 次の新しい行列式を関連付け,これを a_{jk} の小行列式と呼びます.

2. 余因子

 仮に a_{jk} の小行列式に (-1)^{j+k} を乗算するなら,それらの対応する余因子による任意の行(または列)における要素の結果は ラプラス展開 と呼びます.記法では

\displaystyle \det{A} = \sum^{n}_{k=1}a_{jk}A_{jk} \cdots (10)

 この値は用いられる行または列によらず独立です.

Some special definitions and operations involving matrices

1. Equality of Matrices

Two matrices A = (a_{jk}) and B = (b_{jk}) of the same order [i.e. equal numbers of rows and columns] are equal if and only if a_{jk} = b_{jk}.

2. Addition of Matrices

If A = (a_{jk}) and B = (b_{jk}) have the same order we define the sum of A and B as  A + B = (a_{jk} + b_{jk}) .

Note that the communicative and associative laws for addition are satisfied by matrices, i.e. for any matrices A,\ B,\ C of the same order

A + B = B + A,\ A + (B + C) = (A + B) + C \cdots (2)

3. Subtraction of Matrices

If A = (a_{jk}) , B = (b_{jk}) have the same order, we define the difference of A and B as A - B = (a_{jk} - b_{jk}).

4. Multiplication of a Matrix by a Number

If A = (a_{jk}) and \lambda is any number or scalar, we define the product of A by \lambda as \lambda A = A\lambda = (\lambda a_{jk}).

5. Multiplication of Matrices

If A = (a_{jk}) is an m\times n matrix while B = (b_{jk}) is an n\times p matrix, then we define the product A\cdot B or AB as the matrix C = (c_{jk}) where

\displaystyle c_{jk} = \sum_{l = 1}^n a_{jl}b_{lk} \cdots (3)

and where C is of order m\times p.

Note that in general AB \ne BA, i.e. the communicative law for multiplication of matrices is not satisfied in general. However, the associative and distributive laws are satisfied, i.e.

A(BC) = (AB)C,\ A(B + C) = AB + AC,\ (B + C)A = BA + CA \cdots (4)

A matrix A can be multiplied by itself if and only if it is a square matrix. The product A\cdot A can in such case be written A^2. Similarly we define powers of a square matrix, i.e.  A^3 = A\cdot A^2,\ A^4 = A\cdot A^3, etc.

6. Transpose of a Matrix

If we interchange rows and columns of a matrix A, the resulting matrix is called the transpose of A and is denoted by A^T. In symbols, if A = (a_{jk}) then A^T = (a_{kj}).

We can prove that

(A + B)^T = A^T + B^T,\ (AB)^T = B^TA^T,\ (A^T)^T = A \cdots(5)

7. Symmetric and Skew-Symmetric matrices

A square matrix A is called symmetric if A^T = A and skew-symmetric if A^T = - A.

Any real square matrix [i.e. one having only real elements] can always be expressed as the sum of a real symmetric matrix and a real skew-symmetric matrix.

8. Complex Conjugate of a Matrix

If all elements a_{jk} of a matrix A are replaced by their complex conjugates \bar{a}_{jk}, the matrix obtained is called the complex conjugate of A and is denoted by \bar{A}.

9. Hermitian and Skew-Hermitian Matrices

A square matrix A which is the same as the complex conjugate of its transpose, i.e. if  A = \bar{A}^T , is called Hermitian. If  A = -\bar{A}^T , then A is called skew-Hermitian. If A is real these reduce to symmetric and skew-symmetric matrices respectively.

10. Principal Diagonal and Trace of a Matrix

If A = (a_{jk}) is a square matrix, then the diagonal which contains all elements a_{jk} for which  j = k is called the principal or main diagonal and the sum of all elements is called trace of A.

A matrix for which a_{jk} = 0 when  j \ne k is called diagonal matrix.

11. Unit Matrix

A square matrix in which all elements of the principal diagonal are equal to 1 while all other elements are zero is called the unit matrix and is denoted by I. An important property of I is that

 AI = IA = A,\ I^n = I,\ n = 1,2,3,\cdots(6)

The unit matrix plays a role in matrix algebra similar to that played by the number one in ordinary algebra.

12. Zero or Null matrix

A matrix whose elements are all equal to zero is called the null or zero matrix and is often denoted by O or symply 0. For any matrix A having the same order as 0 we have

 A + 0 = 0 + A = A \cdots(7)

Also if A and 0 are square matrices, then

 A0 = 0A = 0 \cdots(8)

The zero matrix plays a role in matrix algebra similar to that played by the number zero of ordinary algebra.

いくつかの行列を含む特殊な定義と演算

1. 行列が等しい

 二つの行列 A = (a_{jk}) および B = (b_{jk}) が同じ次数で(すなわち行と列の数が同じで) a_{jk} = b_{jk} の時にのみ 等しい

2. 行列の和

 仮に A = (a_{jk}) および B = (b_{jk}) が同じ次数ならば A および B A + B = (a_{jk} + b_{jk}) と定義できます.

 行列の交換法則と結合法則は,すなわちある同じ次数の行列 A,\ B,\ C を下記のように記述します.

A + B = B + A,\ A + (B + C) = (A + B) + C \cdots (2)

3. 行列の差

 仮に A = (a_{jk}) , B = (b_{jk}) が同じ次数を有するなら A および BA - B = (a_{jk} - b_{jk}) と定義できます.

4. 行列のスカラー倍

 仮に A = (a_{jk}) があって \lambda が任意の数またはスカラーの時 A\lambda による \lambda A = A\lambda = (\lambda a_{jk}) と定義できます.

5. 行列の積

 仮に A = (a_{jk})m\times n 行列で B = (b_{jk})n\times p 行列の時,A\cdot B または AB を行列 C = (c_{jk}) と定義できます.ここで

\displaystyle c_{jk} = \sum_{l = 1}^n a_{jl}b_{lk} \cdots (3)

また Cm\times p 次です.

 一般に AB \ne BA すなわち行列の積の交換法則は成り立たないことに注意してください.しかしながら結合法則と分配法則は成り立ちます,すなわち

A(BC) = (AB)C,\ A(B + C) = AB + AC,\ (B + C)A = BA + CA \cdots (4)

 ある行列 A がそれ自身との積をつくれるのは正方行列の場合のみです.積  A \cdot A  A^2 と記述します.同様に行列の累乗を定義できます.すなわち  A^3 = A\cdot A^2,\ A^4 = A\cdot A^3 などです.

6. 行列の転置

 行列 A の行と列を入れ替えることができるなら,その結果得られる行列は A転置 と呼び, A^T と記述します.記号では,仮に A = (a_{jk}) ならば A^T = (a_{kj}) と記述します.

以下を証明できます.

(A + B)^T = A^T + B^T,\ (AB)^T = B^TA^T,\ (A^T)^T = A \cdots(5)

7. 対称行列と歪対称行列

 ある正方行列 AA^T = A の時 対称 と呼び,A^T = - A の時 歪対称 と呼びます.

 任意の実正方行列(すなわち実数の要素のみからなる実正方行列)は常に実対称行列と実歪対称行列の和で表現できます.

8. 行列の複素共役

 仮に行列 A のすべての要素 a_{jk} が複素共役 \bar{a}_{jk} で置き換えられたら,その結果得られた行列は A複素共役 と呼び, \bar{A} と記述します.

9. エルミート行列及び歪エルミート行列

 ある行列 A がそれ自身の転置の複素共役に等しい時,すなわち A = \bar{A}^T であるなら エルミート行列 と呼びます.仮に  A = -\bar{A}^T の場合は A歪エルミート行列 と呼びます.仮に A が実行列ならこれらは対称行列および歪対称行列にそれぞれ短縮されます.

10. 主対角線と行列のトレース

 仮に A = (a_{jk}) を正方行列とすると対角線上のすべての要素 a_{jk} について  j = k であるものを principal あるいは 主対角線 と呼び,主対角線上の全要素の和を Aトレース と呼びます.

 ある行列の  j \ne k なる要素について a_{jk} = 0 の時その行列を 対角行列 と呼びます.

11. 単位行列

 ある正方行列について主対角線上の全要素が 1 に等しく他の要素が全てゼロに等しい時 単位行列 と呼び, I と記述します. I の属性については非常に重要です.

 AI = IA = A,\ I^n = I,\ n = 1,2,3,\cdots(6)

 単位ベクトルは行列代数において,普通の代数における数 1 と同じ役割を果たします.

12. 零行列またはヌル行列

 ある行列についてその要素が全てゼロに等しいなら ヌル行列 または 零行列 と呼び, O または単に 0 と記述します.すべての行列 A について同次数の 0 を考えると,

 A + 0 = 0 + A = A \cdots(7)

 また仮に A および 0 が正方行列なら

 A0 = 0A = 0 \cdots(8)

 零行列は行列代数においては通常の対数における数 0 と同じ役割を果たします.

Definition of a matrix

A matrix of order m × n, or m by n matrix, is a rectangular array of numbers having m rows and n columns. It can be written in the form

 A = \left( \begin{array}{ccccc}  a_{11} & a_{12} & a_{13} & \cdots & a_{1n} \\  a_{21} & a_{22} & a_{23} & \cdots & a_{2n} \\  \cdots & \cdots & \cdots & \cdots & \cdots \\  a_{m1} & a_{m2} & a_{3m} & \cdots & a_{mn} \end{array} \right)\cdots(1)

Each number a_{jk} in this matrix is called an element. The subscripts j and k indicate respectively the row and column of the matrix in which the element appears.

We shall often denote a matrix by a letter, such as A in (1), or by the symbol (a_{jk}) which shows a representative element.

A matrix having only one row is called a row matrix or row vector while a matrix having only one column is called a column matrix or column vector. If the number of rows m and columns n are equal the matrix is called a square matrix of order n \times n or briefly n. A matrix is said to be a real matrix or complex matrix according as its elements are real or complex numbers.

行列の定義

 m × n 行列 または mn 行列m 行および n 列を有する長方形の配列です.下記の形式で記述できます.

 A = \left( \begin{array}{ccccc}  a_{11} & a_{12} & a_{13} & \cdots & a_{1n} \\  a_{21} & a_{22} & a_{23} & \cdots & a_{2n} \\  \cdots & \cdots & \cdots & \cdots & \cdots \\  a_{m1} & a_{m2} & a_{3m} & \cdots & a_{mn} \end{array} \right)\cdots(1)

 この配列内のそれぞれの数 a_{jk}要素 と呼びます.添字の j および k は,要素の出現する行列における行と列をそれぞれ示しています.

 行列はしばしば (1) における A のような 1 文字や,代表的な要素を示す記号 (a_{jk}) で記述します.

 ただ 1 行からなる行列を row matrix または 行ベクトル と呼び,ただ 1 列からなる行列を column matrix または 列ベクトル と呼びます.仮に行数 m と列数が n が等しいならその行列を次数 n \times n または単に n 次の 正方行列 と呼びます.行列はその要素が実数か複素数かによって 実行列 または 複素行列 と呼びます.

Special curvilinear coordinates

1. Cylindrical coordinates (\rho, \phi, z)

Transformation equations:  x = \rho\cos\phi ,\ y = \rho\sin\phi ,\ z = z

where \rho \ge 0 ,  0 \le \phi \le 2\pi,  -\infty < z < \infty [/latex].    <em>Scale factors</em>: [latex]h_1 = 1,\ h_2 = 1,\ h_3 = 1

Element of arc length:  ds^2 = d\rho^2 + \rho^2 d\phi^2 + dz^2

Jacobian: \displaystyle \frac{\partial(x, y, z)}{\partial(\rho, \phi, z)} = \rho

Element of volume:  dV = \rho d\rho d\phi dz

Laplacian: \displaystyle \nabla^2U = \frac{1}{\rho}\frac{\partial}{\partial\rho}\left( \rho\frac{\partial U}{\partial\rho} \right) + \frac{1}{\rho^2}\frac{\partial^2U}{\partial\phi^2} + \frac{\partial^2U}{\partial z^2}   = \frac{\partial^2U}{\partial\rho^2} + \frac{1}{\rho}\frac{\partial U}{\partial\rho} + \frac{1}{\rho^2}\frac{\partial^2U}{\partial\phi^2} + \frac{\partial^2U}{\partial z^2}

Note that corresponding results can be obtained for polar coordinates in the plane by omitting z dependence. In such case for example, ds^2 = d\rho^2 + \rho^2d\phi^2, while the element of volume is replaced by the element of area, dA = \rho d\rho d\phi.

2. Spherical coordinates (r, \theta, \phi)

Transformation equations: x = r\sin\theta,\ y = r\sin\theta\sin\phi,\ z = r\cos\theta

where r \ge 0,\ 0 \le \theta \le \pi,\ 0 \le \phi \le 2\pi .

Scale factors: h_1 = 1,\ h_2 = r,\ h_3 = r\sin\theta

Element of arc length:  ds^2 = dr^2 + r^2d\theta^2 + r^2\sin^2\theta d\phi^2

Jacobian: \displaystyle \frac{\partial(x, y, z)}{\partial(r, \theta, \phi)} = r^2\sin\theta

Element of volume:  dV = r^2\sin\theta drd\theta d\phi

Laplacian: \displaystyle \nabla^2U = \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial U}{\partial r}\right) + \frac{1}{r^2\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial U}{\partial\theta}\right) + \frac{1}{r^2\sin^2\theta}\frac{\partial^2U}{\partial\phi^2}

Other types of coordinate systems are possible.

特殊な曲線座標

1. 円柱座標系 (\rho, \phi, z)

変換式:  x = \rho\cos\phi ,\ y = \rho\sin\phi ,\ z = z

ここで \rho \ge 0 ,  0 \le \phi \le 2\pi,

弧長要素:  ds^2 = d\rho^2 + \rho^2 d\phi^2 + dz^2

ヤコビアン: \displaystyle \frac{\partial(x, y, z)}{\partial(\rho, \phi, z)} = \rho

体積要素:  dV = \rho d\rho d\phi dz

ラプラシアン: \displaystyle \nabla^2U = \frac{1}{\rho}\frac{\partial}{\partial\rho}\left( \rho\frac{\partial U}{\partial\rho} \right) + \frac{1}{\rho^2}\frac{\partial^2U}{\partial\phi^2} + \frac{\partial^2U}{\partial z^2}   = \frac{\partial^2U}{\partial\rho^2} + \frac{1}{\rho}\frac{\partial U}{\partial\rho} + \frac{1}{\rho^2}\frac{\partial^2U}{\partial\phi^2} + \frac{\partial^2U}{\partial z^2}

 z 依存性を省略した平面内での極座標系で対応する結果が得られることに注意してください.そのような場合,例えば ds^2 = d\rho^2 + \rho^2d\phi^2 ここで体積要素は面積要素 dA = \rho d\rho d\phi で置換されます.

2. 球面座標系 (r, \theta, \phi)

変換式: x = r\sin\theta,\ y = r\sin\theta\sin\phi,\ z = r\cos\theta

ここで r \ge 0,\ 0 \le \theta \le \pi,\ 0 \le \phi \le 2\pi .

スケール因子: h_1 = 1,\ h_2 = r,\ h_3 = r\sin\theta

弧長要素:  ds^2 = dr^2 + r^2d\theta^2 + r^2\sin^2\theta d\phi^2

ヤコビアン: \displaystyle \frac{\partial(x, y, z)}{\partial(r, \theta, \phi)} = r^2\sin\theta

体積要素:  dV = r^2\sin\theta drd\theta d\phi

ラプラシアン: \displaystyle \nabla^2U = \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial U}{\partial r}\right) + \frac{1}{r^2\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial U}{\partial\theta}\right) + \frac{1}{r^2\sin^2\theta}\frac{\partial^2U}{\partial\phi^2}

他の種類の座標系も可能です.

Gradient, divergence, curl and Laplacian in orthogonal curvilinear coordinates

If \Phi is a scalar function and \bold{A} = A_1\bold{e_1} + A_2\bold{e_2} + A_3\bold{e_3} a vector function of orthogonal curvilinear coordinates u_1, u_2, u_3, we have the following results.

1. \displaystyle \nabla\Phi = grad\Phi = \frac{1}{h_1}\frac{\partial\Phi}{\partial u_1}\bold{e_1} + \frac{1}{h_2}\frac{\partial\Phi}{\partial u_2}\bold{e_2} + \frac{1}{h_3}\frac{\partial\Phi}{\partial u_3}\bold{e_3}

2. \displaystyle \nabla\cdot\bold{A} = div\bold{A} = \frac{1}{h_1h_2h_3}\left[ \frac{\partial}{\partial u_1}(h_2h_3A_1) + \frac{\partial}{\partial u_2}(h_3h_1A_2) + \frac{\partial}{\partial u_3}(h_1h_2A_3) \right]

3. \displaystyle \nabla\times\bold{A} = curl\bold{A}   = \frac{1}{h_1h_2h_3}\left| \begin{array}{ccc} h_1\bold{e_1} & h_2\bold{e_2} & h_3\bold{e_3} \\ \frac{\partial}{\partial u_1} & \frac{\partial}{\partial u_2} & \frac{\partial}{\partial u_3} \\ h_1A_1 & h_2A_2 & h_3A_3 \end{array} \right|

4. \displaystyle \nabla^2\Phi = Laplacian\ of\ \Phi\\   = \frac{1}{h_1h_2h_3}\left[ \frac{\partial}{\partial u_1}\left( \frac{h_2h_3}{h_1}\frac{\partial\Phi}{\partial u_1} \right) + \frac{\partial}{\partial u_2}\left( \frac{h_3h_1}{h_2}\frac{\partial\Phi}{\partial u_2} \right) + \frac{\partial}{\partial u_3}\left( \frac{h_1h_2}{h_3}\frac{\partial\Phi}{\partial u_3} \right) \right]

These reduce to the usual expressions in rectangular coordinates if we replace (u_1, u_2, u_3) by (x, y, z), in which case \bold{e_1}, \bold{e_2} and \bold{e_3} are replaced by \bold{i}, \bold{j} and \bold{k} and h_1 = h_2 = h_3 = 1.

直交曲線座標における勾配,発散,回転およびラプラシアン

 仮に \Phi が一つのスカラー関数であり,また \bold{A} = A_1\bold{e_1} + A_2\bold{e_2} + A_3\bold{e_3} が直交曲線座標 u_1, u_2, u_3 のベクトル関数の時,下記の結果を得ます.

1. \displaystyle \nabla\Phi = grad\Phi = \frac{1}{h_1}\frac{\partial\Phi}{\partial u_1}\bold{e_1} + \frac{1}{h_2}\frac{\partial\Phi}{\partial u_2}\bold{e_2} + \frac{1}{h_3}\frac{\partial\Phi}{\partial u_3}\bold{e_3}

2. \displaystyle \nabla\cdot\bold{A} = div\bold{A} = \frac{1}{h_1h_2h_3}\left[ \frac{\partial}{\partial u_1}(h_2h_3A_1) + \frac{\partial}{\partial u_2}(h_3h_1A_2) + \frac{\partial}{\partial u_3}(h_1h_2A_3) \right]

3. \displaystyle \nabla\times\bold{A} = curl\bold{A}   = \frac{1}{h_1h_2h_3}\left| \begin{array}{ccc} h_1\bold{e_1} & h_2\bold{e_2} & h_3\bold{e_3} \\ \frac{\partial}{\partial u_1} & \frac{\partial}{\partial u_2} & \frac{\partial}{\partial u_3} \\ h_1A_1 & h_2A_2 & h_3A_3 \end{array} \right|

4. \displaystyle \nabla^2\Phi = Laplacian\ of\ \Phi\\   = \frac{1}{h_1h_2h_3}\left[ \frac{\partial}{\partial u_1}\left( \frac{h_2h_3}{h_1}\frac{\partial\Phi}{\partial u_1} \right) + \frac{\partial}{\partial u_2}\left( \frac{h_3h_1}{h_2}\frac{\partial\Phi}{\partial u_2} \right) + \frac{\partial}{\partial u_3}\left( \frac{h_1h_2}{h_3}\frac{\partial\Phi}{\partial u_3} \right) \right]

 仮に (u_1, u_2, u_3)(x, y, z) で置換すると,以下の場合,つまり \bold{e_1}, \bold{e_2} および \bold{e_3}\bold{i}, \bold{j} および \bold{k} で置換され, h_1 = h_2 = h_3 = 1 で置換されるような場合などには,これらの結果は直交座標系の通常の式に短縮されます.

Orthogonal curvilinear coordinates. Jacobians

The transformation equations

x = f(u_1, u_2, u_3)\ y = g(u_1, u_2, u_3)\ z = h(u_1, u_2, u_3)\cdots(17)

where we assume that f, g, h are continuous, have continuous partial derivatives and have a single-valued inverse establish a one to one correspondence between points in an xyz u_1u_2u_3 rectangular coordinate system. In vector notation the transformation (17) can be written

\bold{r} = x\bold{i} + y\bold{j} + z\bold{k} = f(u_1, u_2, u_3)\bold{i} + g(u_1, u_2, u_3)\bold{j} + h(u_1, u_2, u_3)\bold{k}\cdots (18)

A point P can be defined not only by rectangular coordinates (x, y, z) but by coordinates (u_1, u_2, u_3) as well. We call (u_1, u_2, u_3) the curvilinear coordinates of the point.

If u_2 and u_3 are constant, then as u_1 varies, \bold{r} describes a curve which we call the u_1 coordinate curve. Similarly we define the u_2 and u_3 coordinate curves through P.

From (18), we have

\displaystyle d\bold{r} = \frac{\partial\bold{r}}{\partial u_1}du_1 + \frac{\partial\bold{r}}{\partial u_2}du_2 + \frac{\partial\bold{r}}{\partial u_3}du_3 \cdots (19)

The vector \partial\bold{r}/\partial u_1 is tangent to the u_1 coordinate curve at P. If \bold{e_1} is a unit vector at P in this direction, we can write  \partial \bold{r} / \partial u_1 = h_1\bold{e_1} where h_1 = |\partial\bold{r}/\partial u_1|. Similarly we can write \partial\bold{r} / \partial u_2 = h_2\bold{e_2} and  \partial\bold{r}/\partial u_3 = h_3 \bold{e_3}, where h_2 = |\partial\bold{r}/\partial u_2| and  h_3 = |\partial\bold{r}/\partial u_3| respectively. Then (19) can be written

d\bold{r} = h_1du\bold{e_1} + h_2du\bold{e_2} + h_3du\bold{e_3}\cdots(20)

The quantities h_1, h_2, h_3 are sometimes called scale factors.

If \bold{e_1}, \bold{e_2}, \bold{e_3} are mutually perpendicular at any point P, the curvilinear coordinates are called orthogonal. In such case the element of arc length ds is given by

ds^2 = d\bold{r} \cdot d\bold{r} = h_1^2du_1^2 + h_2^2du_2^2 + h_3^2du_3^2 \cdots(21)

and corresponds to the square of the length of the diagonal in the above parallelepiped.

Also, in the case of orthogonal coordinates the volume of the parallelepiped is given by

 dV = |(h_1du_1\bold{e_1}) \cdot (h_2du_2\bold{e_2}) \times (h_3du_3\bold{e_3})| = h_1h_2h_3du_1du_2du_3 \cdots (22)

which can be written by

\displaystyle dV = \left| \frac{\partial\bold{r}}{\partial u_1} \cdot \frac{\partial\bold{r}}{\partial u_2} \times \frac{\partial\bold{r}}{\partial u_3} \right| du_1du_2du_3   = \left| \frac{\partial(x, y, z)}{\partial(u_1, u_2, u_3)} \right|du_1du_2du_3 \cdots (23)

where

\displaystyle \frac{\partial(x, y, z)}{\partial(u_1, u_2, u_3)}   = \left| \begin{array}{ccc}   \frac{\partial x}{\partial u_1} & \frac{\partial x}{\partial u_2} & \frac{\partial x}{\partial u_3} \\   \frac{\partial y}{\partial u_1} & \frac{\partial y}{\partial u_2} & \frac{\partial y}{\partial u_3} \\   \frac{\partial z}{\partial u_1} & \frac{\partial z}{\partial u_2} & \frac{\partial z}{\partial u_3} \end{array} \right|\cdots (24)

is called the Jacobian of the transformation.

It is clear that when the Jacobian is identically zero there is no parallelepiped. In such case there is a functional relationship between x, y and z, i.e. there is a function \phi such that \phi(x, y, z) = 0 identically.

直交曲線座標とヤコビアン

 以下の 変換式

x = f(u_1, u_2, u_3)\ y = g(u_1, u_2, u_3)\ z = h(u_1, u_2, u_3)\cdots(17)

ここで以下の前提を置きます.つまり f, g, h は連続であり,連続な偏微分を有し,直交座標系 xyzu_1u_2u_3 との間で点が 1 対 1 に対応する単一の逆関数が確立しているとします.ベクトル記法においては変換式 (17) は以下のように書けます.

\bold{r} = x\bold{i} + y\bold{j} + z\bold{k} = f(u_1, u_2, u_3)\bold{i} + g(u_1, u_2, u_3)\bold{j} + h(u_1, u_2, u_3)\bold{k}\cdots (18)

 ある点 P直交座標 (x, y, z) だけで定義出来るだけでなく,座標 (u_1, u_2, u_3) によっても定義できます.この (u_1, u_2, u_3) をその点の 曲線座標 と呼びます.

 仮に u_2 および u_3 が定数であり, u_1 が変化すると,\bold{r}u1 座標曲線 と呼ばれる曲線を記述します.同様に P を通る u_2 および u_3 座標曲線を定義できます.

 式 (18) から以下が得られます.

\displaystyle d\bold{r} = \frac{\partial\bold{r}}{\partial u_1}du_1 + \frac{\partial\bold{r}}{\partial u_2}du_2 + \frac{\partial\bold{r}}{\partial u_3}du_3 \cdots (19)

 ベクトル \partial\bold{r}/\partial u_1 は点 P における u_1 座標曲線へのタンジェントです.仮に \bold{e_1} が点 P におけるこの方向への単位ベクトルならこのように書けます,  \partial \bold{r} / \partial u_1 = h_1\bold{e_1} と.ここで h_1 = |\partial\bold{r}/\partial u_1| です.同様に次のように書けます. \partial\bold{r} / \partial u_2 = h_2\bold{e_2} また  \partial\bold{r}/\partial u_3 = h_3 \bold{e_3} ここで,それぞれ h_2 = |\partial\bold{r}/\partial u_2| また  h_3 = |\partial\bold{r}/\partial u_3| です.ゆえに式 (19) は以下のように書けます.

d\bold{r} = h_1du\bold{e_1} + h_2du\bold{e_2} + h_3du\bold{e_3}\cdots(20)

 量 h_1, h_2, h_3 は時に スケール因子 と呼びます.

 仮に \bold{e_1}, \bold{e_2}, \bold{e_3} が点 P において相互に垂直とすると,その曲線座標を 直交 と呼びます.そのような場合,弧長の要素 ds は以下により与えられます.

ds^2 = d\bold{r} \cdot d\bold{r} = h_1^2du_1^2 + h_2^2du_2^2 + h_3^2du_3^2 \cdots(21)

また上記の直方体の対角線の長さの2乗に対応します.

 また,直交座標においては直方体の体積は以下により与えられます.

 dV = |(h_1du_1\bold{e_1}) \cdot (h_2du_2\bold{e_2}) \times (h_3du_3\bold{e_3})| = h_1h_2h_3du_1du_2du_3 \cdots (22)

ここで次のように記述できます.

\displaystyle dV = \left| \frac{\partial\bold{r}}{\partial u_1} \cdot \frac{\partial\bold{r}}{\partial u_2} \times \frac{\partial\bold{r}}{\partial u_3} \right| du_1du_2du_3   = \left| \frac{\partial(x, y, z)}{\partial(u_1, u_2, u_3)} \right|du_1du_2du_3 \cdots (23)

ここで,

\displaystyle \frac{\partial(x, y, z)}{\partial(u_1, u_2, u_3)}   = \left| \begin{array}{ccc}   \frac{\partial x}{\partial u_1} & \frac{\partial x}{\partial u_2} & \frac{\partial x}{\partial u_3} \\   \frac{\partial y}{\partial u_1} & \frac{\partial y}{\partial u_2} & \frac{\partial y}{\partial u_3} \\   \frac{\partial z}{\partial u_1} & \frac{\partial z}{\partial u_2} & \frac{\partial z}{\partial u_3} \end{array} \right|\cdots (24)

上記は変換式の ヤコビアン と呼ばれます.

 ヤコビアンがゼロに等しい時に直方体が存在しないことは明らかです.そのような場合には x, y および z の間には関数関係が存在します.例えば \phi があって,\phi(x, y, z) = 0 のような場合です.

How to BULK INSERT from text file to the table, which primary key is IDENTITY-constrained column?

I’d like to describe how to BULK INSERT from text file to the table with IDENTITY-constrained primary key. You should insert a column into worksheet for primary key such as ‘AUTO_ID’.

TEXTfile

Transact-SQL code is following list. [Table] is table name, FullPath is complete file-path, and FileName is name of text file, respectively. WITH option phrase represents the first row is title.

BULK INSERT dbo.[Table] FROM 'FullPath\FileName.txt' WITH (FIRSTROW = 2);

主キーにIDENTITYの指定のあるテーブルにテキストファイルからBULK INSERTする

 SQL Server で作成したデータベースのテーブルにテキストファイルを BULK INSERT する際の備忘録です.主キーとしたい列に IDENTITY を指定すると初期値 1, 増分 1 の整数を主キーとするテーブルになります.列の IDENTITY 指定をしておかないとエラーとなります.

 用意するテキストファイルにも工夫が必要です.主キーの列名を AUTO_ID であると仮定すると,テキストファイルの 1 列目を空白にしておかなくてはなりません.

TEXTfile

 BULK INSERT する際の Transact-SQL コードは以下のようになります.[Table] にはテーブル名,FullPath には完全なファイルパス,FileName にはテキストファイル名を指定します.WITH 句のオプションは 1 行目がタイトル行であることを示しています.

BULK INSERT dbo.[Table] FROM 'FullPath\FileName.txt' WITH (FIRSTROW = 2);

Anabolic exercise in haemodialysis patients: a randomised controlled pilot study

Nutrition rehabilitation in hemodialysis patients is one of the hottest topics. They have reported that resistance exercise has resulted to muscle strength, but the lack of functional capacity. Although this trial has high evidence with RCT, the number of participants may be too small to determine statistically significant.

Anabolic exercise in haemodialysis patients: a randomised controlled pilot study

Danielle L. Kirkman, Paul Mullins, Naushad A. Junglee, Mick Kumwenda, Mahdi M. Jibani, Jamie H. Macdonald

Abstract

Background

The anabolic response to progressive resistance exercise training (PRET) in haemodialysis patients is unclear. This pilot efficacy study aimed to determine whether high-intensity intradialytic PRET could reverse atrophy and consequently improve strength and physical function in haemodialysis patients. A second aim was to compare any anabolic response to that of healthy participants completing the same program.

Methods

In a single blind controlled study, 23 haemodialysis patients and 9 healthy individuals were randomly allocated to PRET or an attention control (SHAM) group. PRET completed high-intensity exercise leg extensions using novel equipment. SHAM completed low-intensity lower body stretching activities using ultra light resistance bands. Exercises were completed thrice weekly for 12 weeks, during dialysis in the haemodialysis patients. Outcomes included knee extensor muscle volume by magnetic resonance imaging, knee extensor strength by isometric dynamometer and lower body tests of physical function. Data were analysed by a per protocol method using between-group comparisons.

Results

PRET elicited a statistically and clinically significant anabolic response in haemodialysis patients (PRET—SHAM, mean difference [95 % CI]: 193[63 to 324] cm3) that was very similar to the response in healthy participants (PRET—SHAM, 169[−41 to 379] cm3). PRET increased strength in both haemodialysis patients and healthy participants. In contrast, PRET only enhanced lower body functional capacity in the healthy participants.

Conclusions

Intradialytic PRET elicited a normal anabolic and strength response in haemodialysis patients. The lack of a change in functional capacity was surprising and warrants further investigation.

Keywords: Weight lifting, Wasting syndrome, Chronic kidney failure, Haemodialysis

Anabolic exercise in haemodialysis patients: a randomised
controlled pilot study

Anabolic exercise in haemodialysis patients: a randomised controlled pilot study

 血液透析患者における栄養リハビリテーションは最近のトピックの一つです.レジスタンス運動は筋力増強をもたらしたものの,身体機能の改善には至らなかったという報告です.無作為化比較試験であり信頼性は高いのですが,参加者人数が少なく有意差が出なかったのではないかとも考えられます.



透析患者における蛋白同化運動:無作為化比較試験

Danielle L. Kirkman, Paul Mullins, Naushad A. Junglee, Mick Kumwenda, Mahdi M. Jibani, Jamie H. Macdonald

要旨

背景

 透析患者における漸増レジスタンス運動 (PRET) への反応は不明確である.このパイロット有効性研究は,透析患者において透析の間での強度の PRET が萎縮を逆転できるか,また結果的に筋力と身体機能を改善することができるか否かを定義することを目的とする.2番目の目的は蛋白同化反応と,同様のプログラムを完遂した健康な参加者の反応とを比較することである.

方法

 単盲検対照試験において 23 名の透析患者と 9 名の健康な個人が無作為に PRET 群と比較対照群 (SHAM) に割り付けられた.PRET 群は強度の運動,つまり新規の設備を使って下肢を進展する運動を完遂した.SHAM 群は軽度の下半身を進展する活動を超軽量の抵抗バンドを用いて完遂した.透析患者の運動は週に 3 回の透析中に,12 週間にわたって行われた.転帰には MRI による膝伸筋容積,アイソメトリックダイナモメーターによる膝伸展力および身体機能の下半身テストが含まれた.データは群間比較を用いたプロトコルメソッドにより解析した.

結果

 PRET は透析患者において統計的および臨床的に有意に蛋白同化反応を惹起し (PRET—SHAM, mean difference [95 % CI]: 193[63 to 324] cm3), 健常な参加者においても同様であった (PRET—SHAM, 169[−41 to 379] cm3). PRET は透析患者においても健常者においても筋力を増強させた.対照的に, PRET は健常者においてのみ下半身の身体機能を増強させただけであった.

結論

 透析患者において透析中の PRET は正常な蛋白同化と筋力増強を惹起した.身体機能に変化がなかったことは驚くべきものであり,さらなる調査が必要と考えられた.

Keywords: Weight lifting, Wasting syndrome, Chronic kidney failure, Haemodialysis

Anabolic exercise in haemodialysis patients: a randomised
controlled pilot study

How to fix the text file of the food composition of the diet recipes to the first normal form?

In this article, I’d like to describe how to fix the text file of the food composition of the diet recipes, which a facility have provided for one year, to the first normal form in order to insert into database.

Option Explicit

Sub LoopProcedure()
    Dim Sh  As Worksheet
    For Each Sh In Worksheets
        If Sh.Name Like "Sheet" & "*" Then
            Call TransportFromTxtToCSV(Sh)
        End If
    Next Sh
End Sub

Sub TransportFromTxtToCSV()
    Dim mySht               As Worksheet
    Dim myRng               As Range
    Dim myAr                As Variant
    Dim RecAr()             As String
    Dim i                   As Long
    Dim j                   As Long
    Dim k                   As Long
    Dim Date_Serving_Meal   As Date
    Dim Menu_Name           As String
    Dim tmpStart            As Long
    Dim Meal_Time           As String
    Dim Dish                As String
    Dim RecordNumber        As Long
    
    set mysht = sh
    RecordNumber = Count_Record(mySht)
    ReDim RecAr(RecordNumber - 1, 51)
    Set myRng = mySht.UsedRange
    myAr = myRng
    k = 0
    Date_Serving_Meal = "2011/1/1"
    Menu_Name = myAr(1, 11) & myAr(1, 12) & myAr(1, 13)
    tmpStart = InStr(Menu_Name, ")")
    Menu_Name = Mid(Menu_Name, tmpStart + 1)
    Meal_Time = "朝食"
    For i = LBound(myAr) To UBound(myAr)
        
        Select Case True
            Case myAr(i, 2) = "合      計"
                Date_Serving_Meal = DateAdd("d", 1, Date_Serving_Meal)
            Case myAr(i, 2) = "《朝食》"
                Meal_Time = "朝食"
            Case myAr(i, 2) = "《昼食》"
                Meal_Time = "昼食"
            Case myAr(i, 2) = "《夕食》"
                Meal_Time = "夕食"
            Case myAr(i, 2) = "小      計"
            Case myAr(i, 2) = "^e12【献立"
            Case myAr(i, 2) Like "動蛋比" & "*"
            Case myAr(i, 2) = "・・・・・・・・・・"
            Case myAr(i, 2) = "料理名"
            Case myAr(i, 2) = ""
            Case Else
                Dish = myAr(i, 2)
        End Select
        
        Select Case True
            Case myAr(i, 3) = "・・・・・・・・・・・"
            Case myAr(i, 3) Like "EN比" & "*"
            Case myAr(i, 3) = "食品名"
            Case myAr(i, 3) Like "一覧表】 ^e11" & "*"
            Case myAr(i, 3) = ""
            Case Else
                RecAr(k, 0) = Date_Serving_Meal
                RecAr(k, 1) = Menu_Name
                RecAr(k, 2) = Meal_Time
                RecAr(k, 3) = Dish
                RecAr(k, 4) = myAr(i, 3)
                For j = 5 To 22
                    RecAr(k, j) = myAr(i, j - 1)
                Next j
                For j = 23 To 39
                    RecAr(k, j) = myAr(i + 1, j - 18)
                Next j
                For j = 40 To 51
                    RecAr(k, j) = myAr(i + 2, j - 35)
                Next j
                k = k + 1
        End Select
    Next i
    Set mySht = Worksheets.Add
    With mySht
        .Name = Menu_Name
        .Range(Cells(1, 1), Cells(RecordNumber, 52)) = RecAr
    End With
    
    Set mySht = Nothing
    Set myRng = Nothing
    Erase RecAr
End Sub

Function Count_Record(ByRef Sh As Worksheet) As Long    
    Dim mySht       As Worksheet
    Dim myAr        As Variant
    Dim i           As Long
    Dim j           As Long
    Dim k           As Long
    Set mySht = Sh
    myAr = mySht.UsedRange
    j = 0
    k = 0
    For i = LBound(myAr) To UBound(myAr)
        Select Case True
            Case myAr(i, 2) = "合      計"
            Case myAr(i, 2) = "小      計"
            Case myAr(i, 2) = "《朝食》"
            Case myAr(i, 2) = "《昼食》"
            Case myAr(i, 2) = "《夕食》"
            Case myAr(i, 2) = "^e12【献立"
            Case myAr(i, 2) Like "動蛋比" & "*"
            Case myAr(i, 2) = "・・・・・・・・・・"
            Case myAr(i, 2) = "料理名"
            Case myAr(i, 2) = ""
            Case Else
                j = j + 1
        End Select
        Select Case True
            Case myAr(i, 3) = "・・・・・・・・・・・"
            Case myAr(i, 3) Like "EN比" & "*"
            Case myAr(i, 3) = "食品名"
            Case myAr(i, 3) Like "一覧表】 ^e11" & "*"
            Case myAr(i, 3) = ""
            Case Else
                k = k + 1
        End Select
    Next i
    Count_Record = k
End Function

提供食レシピの食品成分のテキストファイルを第1正規形にするEXCEL VBAコード

 ある施設の1年間で提供した食事のレシピの食品成分のテキストファイルから,データベースに取り込むための前処置としてデータを第1正規形に整形する EXCEL VBA コードです.個人的な備忘録です.

 94行目以降の関数 Count_Record は,アクティブシートをループして必要なレコード数を計測する関数です.104行目以降で料理名の数(B列),119行目以降で食品名の数(C列)に注目しています.サブルーチン TransportFromTxtToCSV から呼び出して,動的配列の要素数を後で決定するのに用います.

Option Explicit

Sub LoopProcedure()
    Dim Sh  As Worksheet
    For Each Sh In Worksheets
        If Sh.Name Like "Sheet" & "*" Then
            Call TransportFromTxtToCSV(Sh)
        End If
    Next Sh
End Sub

Sub TransportFromTxtToCSV()
    Dim mySht               As Worksheet
    Dim myRng               As Range
    Dim myAr                As Variant
    Dim RecAr()             As String
    Dim i                   As Long
    Dim j                   As Long
    Dim k                   As Long
    Dim Date_Serving_Meal   As Date
    Dim Menu_Name           As String
    Dim tmpStart            As Long
    Dim Meal_Time           As String
    Dim Dish                As String
    Dim RecordNumber        As Long
    
    set mysht = sh
    RecordNumber = Count_Record(mySht)
    ReDim RecAr(RecordNumber - 1, 51)
    Set myRng = mySht.UsedRange
    myAr = myRng
    k = 0
    Date_Serving_Meal = "2011/1/1"
    Menu_Name = myAr(1, 11) & myAr(1, 12) & myAr(1, 13)
    tmpStart = InStr(Menu_Name, ")")
    Menu_Name = Mid(Menu_Name, tmpStart + 1)
    Meal_Time = "朝食"
    For i = LBound(myAr) To UBound(myAr)
        
        Select Case True
            Case myAr(i, 2) = "合      計"
                Date_Serving_Meal = DateAdd("d", 1, Date_Serving_Meal)
            Case myAr(i, 2) = "《朝食》"
                Meal_Time = "朝食"
            Case myAr(i, 2) = "《昼食》"
                Meal_Time = "昼食"
            Case myAr(i, 2) = "《夕食》"
                Meal_Time = "夕食"
            Case myAr(i, 2) = "小      計"
            Case myAr(i, 2) = "^e12【献立"
            Case myAr(i, 2) Like "動蛋比" & "*"
            Case myAr(i, 2) = "・・・・・・・・・・"
            Case myAr(i, 2) = "料理名"
            Case myAr(i, 2) = ""
            Case Else
                Dish = myAr(i, 2)
        End Select
        
        Select Case True
            Case myAr(i, 3) = "・・・・・・・・・・・"
            Case myAr(i, 3) Like "EN比" & "*"
            Case myAr(i, 3) = "食品名"
            Case myAr(i, 3) Like "一覧表】 ^e11" & "*"
            Case myAr(i, 3) = ""
            Case Else
                RecAr(k, 0) = Date_Serving_Meal
                RecAr(k, 1) = Menu_Name
                RecAr(k, 2) = Meal_Time
                RecAr(k, 3) = Dish
                RecAr(k, 4) = myAr(i, 3)
                For j = 5 To 22
                    RecAr(k, j) = myAr(i, j - 1)
                Next j
                For j = 23 To 39
                    RecAr(k, j) = myAr(i + 1, j - 18)
                Next j
                For j = 40 To 51
                    RecAr(k, j) = myAr(i + 2, j - 35)
                Next j
                k = k + 1
        End Select
    Next i
    Set mySht = Worksheets.Add
    With mySht
        .Name = Menu_Name
        .Range(Cells(1, 1), Cells(RecordNumber, 52)) = RecAr
    End With
    
    Set mySht = Nothing
    Set myRng = Nothing
    Erase RecAr
End Sub

Function Count_Record(ByRef Sh As Worksheet) As Long    
    Dim mySht       As Worksheet
    Dim myAr        As Variant
    Dim i           As Long
    Dim j           As Long
    Dim k           As Long
    Set mySht = Sh
    myAr = mySht.UsedRange
    j = 0
    k = 0
    For i = LBound(myAr) To UBound(myAr)
        Select Case True
            Case myAr(i, 2) = "合      計"
            Case myAr(i, 2) = "小      計"
            Case myAr(i, 2) = "《朝食》"
            Case myAr(i, 2) = "《昼食》"
            Case myAr(i, 2) = "《夕食》"
            Case myAr(i, 2) = "^e12【献立"
            Case myAr(i, 2) Like "動蛋比" & "*"
            Case myAr(i, 2) = "・・・・・・・・・・"
            Case myAr(i, 2) = "料理名"
            Case myAr(i, 2) = ""
            Case Else
                j = j + 1
        End Select
        Select Case True
            Case myAr(i, 3) = "・・・・・・・・・・・"
            Case myAr(i, 3) Like "EN比" & "*"
            Case myAr(i, 3) = "食品名"
            Case myAr(i, 3) Like "一覧表】 ^e11" & "*"
            Case myAr(i, 3) = ""
            Case Else
                k = k + 1
        End Select
    Next i
    Count_Record = k
End Function