Chapter 2
Semitensor Product of Matrices
2.1 MultipleDimensional Data
Roughly speaking, linear algebra mainly concerns two kinds of objects: vectors and
matrices. An ndimensional vector is expressed as X = (x _{1} ,x _{2} ,
ments are labeled by one index, i, where x _{i} is the ith element of X. For an m × n
matrix
,x _{n} ). Its ele
A =
⎡
⎢
⎢
⎢
⎢
⎣
a
a
11
21
.
.
.
a m1
a
a
12
22
a m2
···
···
···
⎤
a
a 2n ⎥
⎥
⎥
⎥
⎦
1n
a mn
,
elements are labeled by two indices, i and j , where a _{i}_{,}_{j} is the element of A located in the ith row and j th column. In this way, it is easy to connect the dimension of a set of data with the number of indices. We deﬁne the dimension of a set of data as follows.
Deﬁnition 2.1 A set of data, labeled by k indices, is called a set of kdimensional data. Precisely,
X
= {x i _{1} ,i _{2} ,
,i
_{k}  1 ≤ i _{j} ≤ n _{j} ,j = 1, 2,
,k}
(2.1)
is a set of kdimensional data. The cardinal number of X, denoted by X, is X = n _{1} n _{2} ···n _{k} .
In the following example we give an example of 3dimensional data.
Example 2.1 Consider R ^{3} , with its canonical basis {e _{1} ,e _{2} ,e _{3} }. Any vector X ∈ R ^{3} may then be expressed as X = x _{1} e _{1} + x _{2} e _{2} + x _{3} e _{3} . When the basis is ﬁxed, we simply use X = (x _{1} ,x _{2} ,x _{3} ) ^{T} to represent it. From simple vector algebra we know that in R ^{3} there is a cross product, ×, such that for any two vectors X,Y ∈ R ^{3} we
D. Cheng et al., Analysis and Control of Boolean Networks, Communications and Control Engineering, DOI 10.1007/9780857290977_2, © SpringerVerlag London Limited 2011
19
20
2
Semitensor Product of Matrices
have X × Y ∈ R ^{3} , deﬁned as follows:
⎝
X × Y = det ⎛
⎣ ⎡
e
x
y
1
1
1
e
x
y
2
2
2
e
x
y
3
3
3
⎤
⎦
⎞
⎠ .
(2.2)
Since the cross product is linear with respect to X as well as Y , it is a bilinear mapping. The value of the cross product is thus uniquely determined by its value on the basis. Write
e _{i} ×e _{j} = c _{i}_{j} e _{1} +c _{i}_{j} e _{2} +c _{i}_{j} e _{3} ,
1
2
3
i,j = 1, 2, 3.
The coefﬁcients form a set of 3dimensional data,
^{} c
k
ij
^{} i,j,k = 1, 2, 3 ^{} ,
which are called the structure constants. Structure constants are easily computable. For instance,
which means that c ture constants:
1
12
⎝
e _{1} ×e _{2} = det ⎛
⎣ ⎡
e 1
e 2
100
010
e 3
⎤
⎦
⎞
⎠ = e _{3} ,
^{=} ^{c} ^{2}
_{1}_{2} = 0, c
^{3} = 1. Similarly, we can determine all the struc
_{1}_{2}
1
c _{1}_{1} = 0,
1
c _{1}_{3} = 0,
1
c _{2}_{2} = 0,
1
c _{3}_{1} = 0,
1
c _{3}_{3} = 0,
^{2}
c _{1}_{1}
= 0,
c _{1}_{3} ^{2} = −1,
2
c _{2}_{2} = 0,
2
c _{3}_{1} = 1,
2
c _{3}_{3} = 0,
^{3}
c _{1}_{1}
= 0,
^{3}
c _{1}_{3}
= 0,
3
c _{2}_{2} = 0,
3
c _{3}_{1} = 0,
3
c _{3}_{3} = 0.
1
c _{1}_{2} = 0,
1
c _{2}_{1} = 0,
1
c _{2}_{3} = 1,
1
c _{3}_{2} = −1,
^{2}
c _{1}_{2}
= 0,
2
c _{2}_{1} = 0,
2
c _{2}_{3} = 0,
2
c _{3}_{2} = 0,
^{3}
c _{1}_{2}
= 1,
3
c _{2}_{1} = −1,
3
c _{2}_{3} = 0,
3
c _{3}_{2} = 0,
Since the cross product is linear with respect to the coefﬁcients of each vec tor, the structure constants uniquely determine the cross product. For instance, let X = 3e _{1} −e _{3} and Y = 2e _{2} + 3e _{3} . Then
X ×Y = 6e _{1} ×e _{2} + 9e _{1} ×e _{3} − 2e _{3} ×e _{2} − 3e _{3} ×e _{3}
=
6 ^{} c
−
1
_{1}_{2} e _{1} +c _{1}_{2}
^{2} e _{2} +c ^{3}
2
_{1}_{2} e _{3} ^{} + 9 ^{} c
3
1
_{1}_{3} e _{1} +c _{1}_{3}
^{2} e _{2} +c ^{3}
2
13 ^{e} 3
2 ^{} c _{3}_{2} e _{1} +c _{3}_{2} e _{2} +c _{3}_{2} e _{3} ^{} − 3 ^{} e _{3}_{3} e _{1} +c _{3}_{3} e _{2} +c
1
1
3
33 ^{e} 3
= 2e _{1} − 9e _{2} + 6e _{3} .
It is obvious that using structure constants to calculate the cross product in this way is very inconvenient, but the example shows that the cross product is uniquely
2.1 MultipleDimensional Data
21
determined by structure constants. So, in general, to deﬁne a multilinear mapping it
is enough to give its structure constants. Using structure constants to describe an algebraic structure is a powerful method.
Deﬁnition 2.2 [6] Let V be an ndimensional vector space with coefﬁcients in R.
If there is a mapping ∗ : V × V → V , called the product of two vectors, satisfying
(αX + βY) ∗ Z = α(X ∗ Z) + β(Y ∗ Z), X ∗ (αY + βZ) = α(X ∗ Y) + β(X ∗ Z)
(2.3)
(where α,β ∈ R, X,Y,Z ∈ V ), then (V, ∗) is called an algebra. Let (V, ∗) be an algebra. If the product satisﬁes associative law, i.e.,
(X ∗ Y) ∗ Z = X ∗ (Y ∗ Z),
X,Y,Z ∈ V,
then it is called an associative algebra.
(2.4)
R ^{3} with the cross product is obviously an algebra. It is also easy to check that it
is not an associative algebra. Let V be an ndimensional vector space and (V, ∗) an algebra. Choosing a basis
{e _{1} ,e _{2} ,
,e
_{n} }, the structure constants can be obtained as
e _{i} ∗e _{j} =
n
k=1
k
c _{i}_{j} e _{k} ,
i,j = 1, 2,
,n.
Although the structure constants {c _{i}_{j}  i,j,k = 1, 2,
basis, they uniquely determine the structure of the algebra. It is also easy to convert
a set of structure constants, which correspond to a basis, to another set of structure
constants, which correspond to another basis. For an algebra, the structure constants are always a set of 3dimensional data. Next, we consider an slinear mapping on an ndimensional vector space. Let V be an ndimensional vector space and let φ : V × V ×···× V → R, satisfying (for
depend on the choice of
k
,n}
any 1 ≤ i ≤ s, α,β ∈ R)
s
φ(X _{1} ,X _{2} ,
,αX
=
αφ(X _{1} ,X _{2} ,
_{i} + βY _{i} ,
,X
_{i} ,
,X
s−1 ,X s )
,X
_{s}_{−}_{1} ,X _{s} ) + βφ(X _{1} ,X _{2} ,
,Y i ,
,X
s−1 ,X s ).
(2.5)
Equation (2.5) shows the linearity of φ with respect to each vector argument. Choos
ing a basis of V , {e _{1} ,e _{2} ,
,e
_{n} }, the structure constants of φ are deﬁned as
φ(e _{i} _{1} ,e _{i} _{2} ,
,e
i _{s} ) = c i _{1} ,i _{2} ,
,i
_{s} ,
i _{j} = 1, 2,
,n,j
= 1, 2,
,s.
uniquely de
termine φ. Conventionally, φ is called a tensor, where s is called its covariant degree.
Similarly, the structure constants, {c _{i} _{1} _{,}_{i} _{2} _{,}
,i
_{s}

i _{1} ,
,i
_{s} = 1, 2,
,n},
22
2
Semitensor Product of Matrices
It is clear that for a tensor with covariant degree s, its structure constants form a set of sdimensional data.
Example 2.2
1. In R ^{3} we deﬁne a three linear mapping as
φ(X,Y,Z) = X × Y,Z ,
X,Y,Z ∈ R ^{3} ,
where ·, · denotes the inner product. Its geometric interpretation is the volume of the parallelogram with X, Y , Z as three adjacent edges [when (X,Y,Z) form
a 
righthand system, the volume is positive, otherwise, the volume is negative]. 
It 
is obvious that φ is a tensor with covariant degree 3. 
2. In R ^{3} we can deﬁne a four linear mapping as
ψ(X,Y,Z,W) = X × Y,Z × W ,
X,Y,Z,W ∈ R ^{3} .
Obviously, ψ is a tensor of covariant degree 4.
Next, we consider a more general case. Let μ : V → R be a linear mapping on V ,
μ(e _{i} ) = c _{i} ,
i = 1,
,n.
Then, μ can be expressed as
μ
= c _{1} e ^{∗} +c _{2} e
1
∗
2
+···+c _{n} e
∗
n ^{,}
where e
∗
i
: V → R satisﬁes
e _{i} (e _{j} ) = δ _{i}_{,}_{j} =
∗
1,
0,
i = j,
i
= j.
It can be seen easily that the set of linear mappings on V forms a vector space, called the dual space of V and denoted by V ^{∗} .
V ^{∗} .
When the basis and the dual basis are ﬁxed, X ∈ V can be expressed as a column
vector and μ ∈ V ^{∗} can be expressed as a row vector, i.e.,
Let X = x _{1} e _{1} +x _{2} e _{2} +···+x _{n} e _{n} ∈
V
and μ = μ _{1} e ^{∗} +μ _{2} e
1
∗
2
+···+μ _{n} e
∗
n
∈
X
= (a _{1} ,a _{2} ,
,a
_{n} ) ^{T} ,
μ = (c _{1} ,c _{2} ,
,c
_{n} ).
Using these vector forms, the action of μ on X can be expressed as their matrix product:
μ(X) = μX =
n
i=1
a _{i} c _{i} ,
μ ∈ V ^{∗} ,X ∈ V.
Let φ : V ^{∗} ×···×V ^{∗} ×V ×···×V → R be an (s + t)fold multilinear map
t
s
ping. Then, φ is said to be a tensor on V with covariant degree s and contravariant
2.1 MultipleDimensional Data
23
degree t. Denote by T ^{s} travariant degree t. If we deﬁne
t
the set of tensors on V with covariant degree s and con
c
i _{1} ,i _{2} , j _{1} ,j _{2} ,
,i
s
,j
_{t}
:= φ ^{} e _{i} _{1} ,e _{i} _{2} ,
,e
∗
_{i} _{s} ,e _{1} ,e
j
∗
j 2 ^{,}
,e
t ^{,}
∗
j
then
^{} c
i _{1} ,i _{2} , j _{1} ,j _{2} ,
,i
s
,j
t
1
≤ i _{1} ,
,i
_{s} ,j _{1} ,
,j
_{t} ≤ n ^{}
form a set of
(s + t)dimensional data. Next, we consider how to arrange higherdimensional data. In linear algebra one dimensional data are arranged as a column or a row, called a vector, while two dimensional data are arranged as a rectangle, called a matrix. In these forms matrix
computation becomes a very convenient and powerful tool for dealing with one or twodimensional data. A question which then naturally arises is how to arrange threedimensional data. A cubic matrix approach has been proposed for this pur pose [1, 2] and has been used in some statistics problems [8–10], but, in general, has not been very successful. The problem is: (1) cubic matrices cannot be clearly expressed in a plane (i.e., on paper), (2) the conventional matrix product does not apply, hence some new product rules have to be produced, (3) it is very difﬁcult to generalize this approach to even higherdimensional cases. The basic idea concerning the semitensor product of matrices is that no matter what the dimension of the data, they are arranged in one or twodimensional form. By then properly deﬁning the product, the hierarchy structure of the data can be automatically determined. Hence the data arrangement is important for the semi tensor product of data.
is the set of structure constants of φ. Structure constants of φ ∈ T ^{s}
t
Deﬁnition 2.3 Suppose we are given a set of data S with ^{} _{i}_{=}_{1} ^{k} n _{i} elements and, as in (2.1), the elements of x are labeled by k indices. Moreover, suppose the elements of x are arranged in a row (or a column). It is said that the data are labeled by indices
i _{1} ,
,i
_{k} according to an ordered multiindex, denoted by Id or, more precisely,
Id(i _{1} ,
,i
_{k} ;n _{1} ,
,n
_{k} ),
if the elements are labeled by i _{1} ,
,k,
run from 1 to n _{t} with the order that t = k ﬁrst, then t = k − 1, and so on, until t = 1.
Hence, x _{α} _{1} _{,}
,i
_{k}
and arranged as follows: Let i _{t} , t = 1,
,α
_{k} is ahead of x _{β} _{1} _{,}
,β
_{k} if and only if there exists 1 ≤ j ≤ k such that
If the numbers n _{1} ,
α _{i} = β _{i} ,
,n
_{k} of i _{1} ,
i = 1,
,j
− 1,
α _{j} < β _{j} .
,i
_{k} are equal, we may use
Id(i _{1} ,
,i
_{k} ; n) := Id(i _{1} ,
,i
_{k} ; n,
,n).
If n _{i} are obviously known, the expression of Id can be simpliﬁed as
Id(i _{1} ,
,i
_{k} ) := Id(i _{1} ,
,i
_{k} ;n _{1} ,
,n
_{k} ).
24
2
Semitensor Product of Matrices
Example 2.3
1. Assume x = {x _{i}_{j}_{k}  i = 1, 2, 3; j = 1, 2; k = 1, 2}. If we arrange the data accord ing to the ordered multiindex Id(i,j,k), they are
x 111 ,x 112 ,x 121 ,x 122 ,x 211 ,x 212 ,x 221 ,x 222 ,x 311 ,x 312 ,x 321 ,x 322 .
If they are arranged by Id(j,k,i), they become
x 111 ,x 211 ,x 311 ,x 112 ,x 212 ,x 312 ,x 121 ,x 221 ,x 321 ,x 122 ,x 222 ,x 322 .
2.
Let x = {x _{1} ,x _{2} ,
a _{i} = a _{λ} _{1} _{,}_{λ} _{2} _{,}_{λ} _{3} , then under different Id’s they have different arrangements:
,x
_{2}_{4} }. If we use λ _{1} , λ _{2} , λ _{3} to express the data in the form
(a) 
Using the ordered ranged as multiindex Id(λ _{1} ,λ _{2} ,λ _{3} ; 2, 3, 4), the elements are ar 

x 
111 
x 
112 
x 
113 
x 
114 

x 
121 
x 
122 
x 
123 
x 
124 

x 
131 
x 
132 
x 
133 
x 
134 

. 

. 

. 

x 231 
x 
232 
x 
233 
x 234 . 

(b) 
Using the ordered multiindex Id(λ _{1} ,λ _{2} ,λ _{3} ; 3, 2, 4), the elements are ar ranged as 

x 
111 
x 
112 
x 
113 
x 
114 

x 
121 
x 
122 
x 
123 
x 
124 

x 
211 
x 
212 
x 
213 
x 
214 

. 

. 

. 

x 321 
x 
322 
x 
323 
x 324 . 

(c) 
Using the ordered ranged as multiindex Id(λ _{1} ,λ _{2} ,λ _{3} ; 4, 2, 3), the elements are ar 
x
x
x
.
x 421
.
.
111
121
211
x
x
x
x
112
122
212
422
x
x
x
113
123
213
x 423 .
Note that in the above arrangements the data are divided into several rows, but this is simply because of spatial restrictions. Also, in this arrangement the hierarchy structure of the data is clear. In fact, the data should be arranged into one row.
Different Id’s, corresponding to certain index permutations, cause certain per mutations of the data. For convenience, we now present a brief introduction to the permutation group. Denote by S _{k} the permutations of k elements, which form a
2.1 MultipleDimensional Data
25
group called the k th order permutation group. We use 1,
ments. If we suppose that k = 5, then S _{5} consists of all possible permutations of ﬁve elements: {1, 2, 3, 4, 5}. An element σ ∈ S _{5} can be expressed as
,k to denote the k ele
σ = ⎡ ↓↓↓↓↓ ⎦ ∈ S _{5} .
⎣
12345
⎤
23154
That is, σ changes 1 to 2, 2 to 3, 3 to 1, 4 to 5, and 5 to 4. σ can also be simply expressed in a rotational form as
σ = (1, 2, 3)(4, 5).
Let μ ∈ S _{5} and
μ = ⎡ ↓↓↓↓↓ ⎦ .
12345
⎣
43215
⎤
The product (group operation) on S _{5} is then deﬁned as
⎤
⎥
⎥
⎥
⎥
⎦
μσ =
⎡
⎢
⎢
⎢
⎢
⎣
12345
↓↓↓↓↓
23154
↓↓↓↓↓
32451
,
that is, μσ = (1, 3, 4, 5). If, in (2.1), the data x are arranged according to the ordered multiindex
Id(i _{1} ,
_{k} ), it is said that the data are arranged in a natural order. Of course, they
_{σ}_{(}_{k}_{)} ), that is, letting index i _{σ}_{(}_{k}_{)} run from
1 to n _{σ}_{(}_{k}_{)} ﬁrst, then letting i _{σ}_{(}_{k}_{−}_{1}_{)} run from 1 to n _{σ}_{(}_{k}_{−}_{1}_{)} , and so on. It is obvious
that a different Id corresponds to a different data arrangement.
may be arranged in the order of (i _{σ}_{(}_{1}_{)} ,
,i
,i
Deﬁnition 2.4 Let σ ∈ S _{k} and x be a set of data with ^{} _{i}_{=}_{1} ^{k} n _{i} elements. Arrange x in a row or a column. It is said that x is arranged by the ordered multiindex
Id(i _{σ}_{(}_{1}_{)} ,
ning in the following order: ﬁrst, i _{σ}_{(}_{k}_{)} runs from 1 to n _{σ}_{(}_{k}_{)} , then i _{σ}_{(}_{k}_{−}_{1}_{)} runs from
_{k} in the sequence are run
_{σ}_{(}_{k}_{)} ) if the indices i _{1} ,
,i
_{σ}_{(}_{k}_{)} ;n _{σ}_{(}_{1}_{)} ,
,n
,i
1 to n _{σ}_{(}_{k}_{−}_{1}_{)} , and so on, until, ﬁnally, i _{σ}_{(}_{1}_{)} runs from 1 to n _{σ}_{(}_{1}_{)} .
We now introduce some notation. Let a ∈ Z and b ∈ Z _{+} . As in the programming language C, we use a%b to denote the remainder of a/b, which is always nonnega tive, and [t] for the largest integer that is less than or equal to t. For instance,
100%3 = 1,
^{} 7
3
= 2,
100%7 = 2, 
(−7)%3 = 2, 
[−1.25]=−2. 
26
2
Semitensor Product of Matrices
It is easy to see that
a
= ^{a} _{b} b + a%b.
(2.6)
Next, we consider the indexconversion problem. That is, we sometimes need to convert a single index into a multiindex, or vice versa. Particularly, when we need to deform a matrix into a designed form using computer, index conversion is necessary. The following conversion formulas can easily be proven by mathematical induction.
Proposition 2.1 Let S be a set of data with n = ^{} _{i}_{=}_{1} ^{k} n _{i} elements. The data are labeled by single index as {x _{i} } and by kfold index, by the ordered multiindex
Id(λ _{1} ,
,λ
_{k} ;n _{1} ,
,n
_{k} ), as
S = {s _{p}  p = 1,
,n}={s
λ _{1} ,
,λ
_{k}  1 ≤ λ _{i} ≤ n _{i} ;i = 1,
,k}.
We then have the following conversion formulas:
1. Single index to multiindex. Deﬁning p _{k} := p − 1, the single index p can be
converted into the order of the ordered multiindex Id(i _{1} ,
(λ _{1} ,
,λ
_{k} ), where λ _{i} can be calculated recursively as
⎧ ⎨ λ _{k} = p _{k} %n _{k} + 1,
⎩
_{p} _{j} _{=} _{[} p j+1
n
j+1
],
λ _{j} = p _{j} %n _{j} + 1,
j = k − 1,
2. Multiindex to single index. From multiindex (λ _{1} ,
,λ
Id(i _{1} ,
,i
_{k} ;n _{1} ,
,n
_{k} ) back to the single index, we have
p =
k−1
j=1
(λ _{j} − 1)n _{j}_{+}_{1} n _{j}_{+}_{2} ···n _{k} +λ _{k} .
,i
_{k} )
_{k} ;n _{1} , ,n 
_{k} ) as 

(2.7) 

,1. 

in 
the order of 

(2.8) 
The following example illustrates the conversion between different types of in dices.
Example 2.4 Recalling the second part of Example 2.3, we may use different types of indices to label the elements.
1. Consider an element which is x _{1}_{1} in singleindex form. Converting it into the order of Id(λ _{1} ,λ _{2} ,λ _{3} ; 2, 3, 4) by using (2.7), we have
p _{3} = p − 1 = 10,
λ _{3} = p _{3} %n _{3} + 1 = 10%4 + 1 = 2 + 1 = 3,
p 2 =
^{} ^{p} ^{3}
n
3
^{} _{=} ^{} 10
2
= 2,
λ _{2} = p _{2} %n _{2} + 1 = 2%3 + 1 = 2 + 1 = 3,
2.1 MultipleDimensional Data
27
Hence x _{1}_{1} = x _{1}_{3}_{3} .
2
p _{1} =
4
λ _{1} = p _{1} %n _{1} + 1 = 0%2 + 1 = 1.
^{} ^{p} ^{2}
n
2
=
= 0,
2. Consider the element x _{2}_{1}_{4} in the order of Id(λ _{1} ,λ _{2} ,λ _{3} ; 2, 3, 4). Using (2.8), we have
p = (λ _{1} − 1)n _{2} n _{3} + (λ _{2}
Hence x _{2}_{1}_{4} = x _{1}_{6} .
− 1)n _{3} +λ _{3} = 1 · 3 · 4 + 0 + 4 = 16.
3. In the order of Id(λ _{2} ,λ _{3} ,λ _{1} ; 3, 4, 2), the data are arranged as
x
x
x
x
111
113
.
.
.
131
133
x
x
x
x
211
213
231
233
x
x
x
x
112
114
132
134
x
x
x
212
214
232
x 234 .
For this index, if we want to use the formulas for conversion between nat ural multiindex and single index, we can construct an auxiliary natural multi index y _{Λ} _{1} _{,}_{Λ} _{2} _{,}_{Λ} _{3} , where Λ _{1} = λ _{2} , Λ _{2} = λ _{3} , Λ _{3} = λ _{1} and N _{1} = n _{2} = 3, N _{2} = n _{3} = 4, N _{3} = n _{1} = 2. Then, b _{i}_{,}_{j}_{,}_{k} is indexed by (Λ _{1} ,Λ _{2} ,Λ _{3} ) in the order of Id(Λ _{1} ,Λ _{2} ,Λ _{3} ;N _{1} ,N _{2} ,N _{3} ). In this way, we can use (2.7) and (2.8) to convert the indices. For instance, consider x _{1}_{2}_{4} . Let x _{1}_{2}_{4} = y _{2}_{4}_{1} . For y _{2}_{4}_{1} , using (2.7), we have
p = (Λ _{1} − 1)N _{2} N _{3} + (Λ _{2} − 1)N _{3} +Λ _{3}
= (2 − 1) × 4 × 2 + (4 − 1) × 2 + 1 = 8 + 6 + 1 = 15.
Hence
x 124 = y 241 = y 15 = x 15 .
Consider x _{1}_{7} again. Since x _{1}_{7} = y _{1}_{7} , using (2.6), we have
p _{3} = p − 1 = 16,
p _{2} = [p _{3} /N _{3} ] = 8,
p _{1} = [p _{2} /N _{2} ] = 2,
Hence x 17 = y 17 = y 311 = x 131 .
Λ _{3} = p _{3} %N _{3} + 1 = 1,
Λ _{2} = p _{2} %N _{2} + 1 = 1,
Λ _{1} = p _{1} %N _{1} + 1 = 3.
From the above argument one sees that a set of higherdimensional data, labeled by a multiindex, can be converted into a set of 1dimensional data, labeled by
28
2
Semitensor Product of Matrices
Table 2.1 
The prisoner’s 
dilemma 
P _{1} \P _{2} 
A _{1} 
A _{2} 

A 
_{1} 
−1, −1 
−9, 0 
A 
_{2} 
0, −9 
−6, −6 
singleindex. A matrix, as a set of 2dimensional data, can certainly be converted into a set of 1dimensional data. Consider a matrix
A = ⎣ ⎡
⎢
a 11
.
.
.
a m1
a 12
.
.
.
a m2
···
···
a 1n
.
.
.
a mn
⎤
⎥
⎦.
The rowstacking form of A, denoted by V _{r} (A), is a rowbyrow arranged nm vector, i.e.,
(2.9)
The columnstacking form of A, denoted by V _{c} (A), is the following nmvector:
(2.10)
V _{r} (A) = (a _{1}_{1} ,a _{1}_{2} ,
V _{c} (A) = (a _{1}_{1} ,a _{2}_{1} ,
,a
_{1}_{n} ,
,a
_{m}_{1} ,a _{m}_{2} ,
,a
_{m}_{n} ) ^{T} .
,a
_{m}_{n} ) ^{T} .
,a
_{m}_{1} ,
,a
_{1}_{n} ,a _{2}_{n} ,
From the deﬁnition it is clear that we have the following result.
Proposition 2.2
V _{c} (A) = V _{r} ^{} A ^{T} ^{} ,
V _{r} (A) = V _{c} ^{} A ^{T} ^{} .
(2.11)
Finally, we give an example for multidimensional data labeled by an ordered multiindex.
Example 2.5
1. Consider the socalled prisoner’s dilemma [5]. Two suspects are arrested and charged with a crime and each prisoner has two possible strategies:
A _{1} :
not confess (or be mum);
A _{2} :
confess (or ﬁnk).
The payoffs are described by a payoff bimatrix, given in Table 2.1. For instance, if prisoner P _{1} chooses “mum” (A _{1} ) and P _{2} chooses “ﬁnk” (A _{2} ), P _{1} will be sentenced to jail for nine months and P _{2} will be released. Now, if we denote by
i
r _{j}_{,}_{k} ,
i = 1,2,j = 1,2,k = 1,2,
i
the payoff of P _{i} as P _{1} takes strategy j and P _{2} takes strategy k, then {r _{j}_{,}_{k} } is a set of 3dimensional data. We may arrange it into a payoff matrix as
M p =
r
r
1
11
2
11
^{r}
^{r}
1
12
2
12
^{r}
^{r}
1
21
2
21
^{r}
^{r}
22 =
1
22
2
−1
−1
−9
0
0
−9
−6
−6
.
(2.12)
2.2 Semitensor Product of Matrices
29
2. Consider a game with n players. Player P _{i} has k _{i} strategies and the payoff of P _{i}
as P _{j} takes strategy s _{j} , j = 1,
r
i
s 1 ,
,s
_{n} ,
i = 1,
,n, is
,n;s
_{j} = 1,
,k
_{j} ,j = 1,
,n.
Then, {r
row index and its column by the ordered multiindex Id(s _{1} , we have
i
s 1 ,
_{n} } is a set of (n + 1)dimensional data. Arranging it with i as the
_{n} ),
,s
,s
_{n} ;k _{1} ,
,k
M g = ⎣ ⎡
⎢
r
r
1
11···1
.
.
.
n
11···1
^{·}^{·}^{·}
^{·}^{·}^{·}
^{r}
^{r}
1
11···k
n
11···k
_{n}
_{n}
^{·}^{·}^{·}
^{·}^{·}^{·}
1
^{r} 1k _{2} ···k _{n}
n
^{r} 1k _{2} ···k _{n}
^{·}^{·}^{·}
^{·}^{·}^{·}
1
^{r} k _{1} k _{2} ···k _{n}
n
^{r} k _{1} k _{2} ···k _{n}
M _{g} is called the payoff matrix of game g.
⎤
⎥
_{⎦} .
(2.13)
2.2 Semitensor Product of Matrices
We consider the conventional matrix product ﬁrst.
Example 2.6 Let U and V be m and ndimensional vector spaces, respectively. Assume F ∈ L(U × V, R), that is, F is a bilinear mapping from U × V to R.
Denote by {u _{1} ,
_{n} } the bases of U and V , respectively. We
call S = (s _{i}_{j} ) the structure matrix of F , where
,u
_{m} } and {v _{1} ,
,v
s _{i}_{j} = F(u _{i} ,v _{j} ),
i = 1,
If we let X = ^{} _{i}_{=}_{1} ^{m} x _{i} u _{i} ∈ U , otherwise
Y
Y = ^{} _{i}_{=}_{1} ^{n} y _{i} v _{i} ∈ V , otherwise written as
,m,
j = 1,
,n.
written as X = (x _{1} ,
= (y _{1} ,
,x
_{m} ) ^{T} ∈ U , and
,y
_{n} ) ^{T} ∈ V , then
F(X,Y) = X ^{T} SY.
,S
(2.14)
^{m} , we can alternatively calculate F in two
Denoting the rows of S by S ^{1} , steps.
Step 1: Calculate x _{1} S ^{1} , x _{2} S ^{2} ,
Step 2: Multiply ^{} _{i}_{=}_{1} ^{m} x _{i} S ^{i} by Y (which is a standard inner product).
, x _{m} S ^{m} and take their sum.
It is easy to check that this algorithm produces the same result. Now, in the ﬁrst step it seems that we have (S ^{1} ···S ^{n} ) × X. This calculation motivates a new algo rithm, which is deﬁned as follows.
Deﬁnition 2.5 Let T be an np dimensional row vector and X a p dimensional
column vector. Split T into p equal blocks, named T ^{1} , matrices. Deﬁne a left semitensor product, denoted by , as
,T 
^{p} , which are 1 × n 
(2.15) 
p
T X =
T
^{i} x _{i} ∈ R ^{n} .
i=1
30
2
Semitensor Product of Matrices
Using this new product, we reconsider Example 2.6 and propose another algo rithm.
Example 2.7 (Example 2.6 continued) We rearrange the structure constants of F into a row as
T : V _{r} (S) = (s _{1}_{1} ,
,s
1n ,
,s
m1 ,
,s
mn ),
called the structure matrix of F . This is a row vector of dimension mn, labeled by the ordered multiindex Id(i,j ; m,n). The following algorithm provides the same result as (2.14):
F(X,Y) = T X Y.
(2.16)
It is easy to check the correctness of (2.16), but what is its advantage? Note that (
Bien plus que des documents.
Découvrez tout ce que Scribd a à offrir, dont les livres et les livres audio des principaux éditeurs.
Annulez à tout moment.