You are on page 1of 37

Matrix Algebra

Steve Borgatti Intermediate Network Analysis


2016 LINKS Center Summer Workshop University of Kentucky
tinyurl.com/intermediate2016
Why do we care?
Along with graph theory, one of two mathematical bases of network
analysis
Provides a universal language for describing data and procedures on
data
Dichotomizing, symmetrizing, transposing matrices
Matrix multiplication is important for many SNA operations, including
converting 2-mode to 1-mode data and measuring centrality

5 June 2016 (c) 2016 Stephen P Borgatti 2


Matrices in SNA
In SNA, we typically encounter three kinds of matrices
Adjacency matrices representing a normal network
Square, 1-mode (rows and columns refer to same sets of entities)
Incidence matrix Vector
Rectangular 2-mode (rows and columns refer to separate sets of entities) Age
Profile matrices case by variable; attribute matrix Mary 32
Rectangular matrices in which each column is a variable Bill 50
E E E E E John 12
1 2 3 4 5
Larry 20
EVELYN 1 1 0 1 0
a b c d LAURA 1 0 1 0 1
a 0 1 0 1 THERESA 0 1 0 1 0 Age Gender Income
b 0 0 1 0 BRENDA 1 0 0 1 0 Mary 32 1 90,000
c 0 1 0 0 CHARLOTTE 0 0 1 1 1 Bill 50 2 45,000
d 1 0 1 0 FRANCES 0 0 1 0 0
John 12 2 0
ELEANOR 0 0 0 0 1
5 June 2016 PEARL (c) 0 0 Stephen
2016 0 0 0P Borgatti Larry 20 2 8,000 3
2-way 1-mode adjacency matrix of a graph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
HO BR CA PA PA JE PA AN MI BI LE DO JO HA GE ST BE RU
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
1 HOLLY 0 0 0 1 1 0 0 0 1 0 0 1 0 1 0 0 0 0
2 BRAZEY 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 0
3 CAROL 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0
4 PAM 1 0 1 0 0 1 1 1 0 0 0 0 0 0 0 0 0 0
5 PAT 1 0 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0
6 JENNIE 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0
7 PAULINE 0 0 1 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0
8 ANN 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0
9 MICHAEL 1 0 0 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0
10 BILL 0 0 0 0 0 0 0 0 1 0 0 1 0 1 0 0 0 0
11 LEE 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0
12 DON 1 0 0 0 0 0 0 0 1 1 0 0 0 1 0 0 0 0
13 JOHN 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1
14 HARRY 1 0 0 0 0 0 0 0 1 1 0 1 0 0 0 0 0 0
15 GERY 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1
16 STEVE 0 1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 1
17 BERT 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1
18 RUSS 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 0

5 June 2016 (c) 2016 Stephen P Borgatti 4


2-Way, 1-Mode proximity matrix
Mary Bill John Larry
Mary 0 1 0 1
Network Adjacency matrix Bill 1 0 0 1
Friends John 0 1 0 0
Larry 1 0 1 0

1 2 3 4 5 6 7 8 9
BOST NY DC MIAM CHIC SEAT SF LA DENV
---- ---- ---- ---- ---- ---- ---- ---- ----
1 BOSTON 0 206 429 1504 963 2976 3095 2979 1949
2 NY 206 0 233 1308 802 2815 2934 2786 1771
3 DC 429 233 0 1075 671 2684 2799 2631 1616
4 MIAMI 1504 1308 1075 0 1329 3273 3053 2687 2037
5 CHICAGO 963 802 671 1329 0 2013 2142 2054 996
6 SEATTLE 2976 2815 2684 3273 2013 0 808 1131 1307
7 SF 3095 2934 2799 3053 2142 808 0 379 1235
8 LA 2979 2786 2631 2687 2054 1131 379 0 1059
9 DENVER 1949 1771 1616 2037 996 1307 1235 1059 0

5 June 2016 Physical Proximity(c)Matrix Driving


2016 Stephen P Borgattidistance between cities 5
3-way data
Events
0 0 0 1 1 0 0 0
0 0 00 10 10 00 00 00 0 0
0 0 00 10 100 000 000 001 01 00 1 0
0 0 00 01 001 000 000 010 010 000 10 01 1 1
0 0 00 00 000 100 101
0 000 101 010 10 11 0 0
0 0 00 01 011 000 010
1 100 100 111 01 00 0 1
0 0 10 00 100 001 000
1 110
1 011 001 01 10 0 0
Person 1 0 01 00 000 101 110 010 010 101 00 01 1 0
0 0 00 01 101 100 100 011 00 01 1 0
0 0 01 01 01 10 00 10 1 0
0 0 0 1 0 1 1 0

3-way, 2-mode 3-way, 1-mode


Longitudinal affiliations data Krackhardt-style perceptions
by each person of relations
among all pairs of persons
5 June 2016 (c) 2016 Stephen P Borgatti 6
Multiplying a matrix by a vector
If A is a matrix (with n columns) and v is a vector (with n values) then
the product Av is a new vector (call it y) whose values are defined as
follows
= = 1 + 2 2 + 3 3 +

A v Av
0 1 0 1 1 6 How much cash ego
1 0 1 0 x 2 = 4 can borrow from
0 1 0 0 3 2 friends
1 1 1 0 4 6

friends Cash available


5 June 2016 (c) 2016 Stephen P Borgatti 7
Multiplying a matrix by a vector
Let 1 be a vector of all ones. Then the product A1 is a vector
containing the row sums of A A 1 A1
0 1 0 1 1 2
= 1 1 0 1 0 x 1 = 2
0 1 0 0 1 1
1 1 1 0 1 3

So when v is not all ones, then Av is just taking the weighted sum of
each row of A, weighted by v A v Av
0 1 0 1 1 6
Here we are just summing the 1 0 1 0 x 2 = 4
value of each of is contacts 0 1 0 0 3 2
1 1 1 0 4 6
5 June 2016 (c) 2016 Stephen P Borgatti 8
Multiplying a matrix by a pair of vectors
For convenience we place the two vectors side by side
First do the multiplication for the first vector, then do it for the second
A v1 v2 Av1 Av2
0 1 0 1 1 4 6 4
1 0 1 0 x 2 3 = 4 6
0 1 0 0 3 2 2 3
1 1 1 0 4 1 6 9

Another way to think of this is just matrix multiplication


A B C=AB
0 1 0 1 1 4 6 4
1 0 1 0 x 2 3 = 4 6 =
0 1 0 0 3 2 2 3
1 1 1 0 4 1 6 9

5 June 2016 (c) 2016 Stephen P Borgatti 9


Matrix multiplication
Critical in SNA for several things
Composition of relations
Transitivity
Converting 2-mode data to 1-mode data
Calculating the number of walks of specific lengths between pairs of nodes
(powers of a matrix)
Used in centrality measures, especially beta centrality

5 June 2016 (c) 2016 Stephen P Borgatti 10


Matrix Multiplication
C = AB Note: matrix products are
Notation: not generally commutative.

Definition: cij = aik bkj i.e., AB does not usually


equal BA
k

Example:

Mary Bill John Larry Mary Bill John Larry Mary Bill John Larry
Mary 0 1 1 1 Mary 0 0 1 1 Mary 1 1 1 1
Bill 1 0 1 0 Bill 1 0 1 0 Bill 0 0 1 2
John 0 0 0 1 John 0 0 0 1 John 0 1 0 0
Larry 0 0 0 0 Larry 0 1 0 0 Larry 0 0 0 0
A B C=AB
5 June 2016 (c) 2016 Stephen P Borgatti 11
Time to do an exercise

5 June 2016 (c) 2016 Stephen P Borgatti 12


Boolean matrix multiplication
Values can be 0 or 1 for all matrices
Products are dichotomized
Would have been a 2 in
regular matrix multiplication

Mary Bill John Larry Mary Bill John Larry Mary Bill John Larry
Mary 0 1 0 1 Mary 0 0 1 1 Mary 1 1 1 0
Bill 1 0 1 0 Bill 1 0 1 0 Bill 0 0 0 1
John 0 0 0 1 John 0 0 0 1 John 0 1 0 0
Larry 0 0 0 0 Larry 0 1 0 0 Larry 0 0 0 0

A B AB

5 June 2016 (c) 2016 Stephen P Borgatti 13


Composition of relations
We represent each social relation (e.g., F= friend of, B = boss of) as a matrix
To create the compound relation friend of the boss of (FB), we just multiply
the two matrices F B FB
a b c d a b c d a b c d
a 0 1 0 1 a 0 0 1 1 a 1 0 0 0
b 1 0 1 0 x b 1 0 0 0 = b 0 1 1 1
c 1 1 0 1 c 0 1 0 0 c 1 0 1 1
d 1 0 1 0 d 0 0 0 0 d 0 1 1 1

FB(c,a) = 1 means that person c is friend of someone (namely b) who is the


boss of a. i.e., c is friends with as boss
FB(a,a) = 1 means person a is friends with someone (b again) who is her
boss. i.e., a is friends with her boss.

5 June 2016 (c) 2016 Stephen P Borgatti 14


Composition of relations
B is the transpose of B. B is the inverse of the B relationship. If B was boss of,
then B is reports to or is subordinate of.
To create the compound relation friend of the subordinate of (FB), we just
multiply the two matrices F B' FB
a b c d a b c d a b c d
a 0 1 0 1 a 0 1 0 0 a 1 0 1 0
b 1 0 1 0 x b 0 0 1 0 = b 1 1 0 0
c 1 1 0 1 c 1 0 0 0 c 1 1 1 0
d 1 0 1 0 d 1 0 0 0 d 1 1 0 0
FB(c,a) = 1 means that person c is friend of someone (namely d) who is a
subordinate of a. i.e., c is friends with as subordinate
FB(a,a) = 1 means person a is friends with someone (d) who is her subordinate.
i.e., a is friends with one of her direct reports.

5 June 2016 (c) 2016 Stephen P Borgatti 15


Transitivity
If a likes b and b likes c, does that mean a likes c?
L = likes someone, LL is likes someone who likes someone
L L LL
a b c d a b c d a b c d
a 0 1 0 1 a 0 1 0 1 a 1 0 2 0
b 0 0 1 0 x b 0 0 1 0 = b 0 1 0 0
c 0 1 0 0 c 0 1 0 0 c 0 0 1 0
d 1 0 1 0 d 1 0 1 0 d 0 2 0 1

So, LL(a,c) > 0 means that a likes someone who likes c


If matrix L = matrix LL, then L is a transitive relation, in keeping with balance theory
In this example, L(a,c) = 0, which means that a doesnt like the person that the people he likes like.
So Liking is not a transitive relation
Note diagonal of LL is all 1s, so everyone is lucky enough to like someone who likes them

5 June 2016 (c) 2016 Stephen P Borgatti 16


Path lengths
We can think of LL as L2. If L2(a,c) > 0, it means there exists a path
(technically, a walk) from a to c that is exactly 2 links long
If we compute LLL or L3, then L3(a,c) > 0 means there exists at least one walk
from a to c that is exactly 3 links long
More generally if Lk(i,j) > 0, it means there is at least one walk from i
to j that is exactly k links long
Moreover, Lk(i,j) = 7 means there are 7 different walks from i to j that are of
length k
L L LL
a b c d a b c d a b c d
a 0 1 0 1 a 0 1 0 1 a 1 0 2 0
b 0 0 1 0 x b 0 0 1 0 = b 0 1 0 0
c 0 1 0 0 c 0 1 0 0 c 0 0 1 0
d 1 0 1 0 d 1 0 1 0 d 0 2 0 1
5 June 2016 (c) 2016 Stephen P Borgatti 17
Powers of the adjacency matrix
If you multiply an adjacency matrix X by itself, you get XX or X2
A given cell x2ij gives the number of walks from node i to node j of
length 2
More generally, the cells of Xk give the number of walks of length
exactly k from each node to each other

5 June 2016 (c) 2016 Stephen P Borgatti 18


Matrix powers example
Note that shortest path from 1 to 5 is
three links, so x1,5 = 0 until we get to X3

1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6
1 0 1 0 0 0 0 1 1 0 1 0 0 0 1 0 2 0 1 1 0 1 2 0 4 1 1 1
2 1 0 1 0 0 0 2 0 2 0 1 1 0 2 2 0 4 1 1 1 2 0 6 2 5 6 1
3 0 1 0 1 1 0 3 1 0 3 1 1 1 3 0 4 2 4 5 1 3 4 2 13 7 7 5
4 0 0 1 0 1 0 4 0 1 1 2 1 1 4 1 1 4 2 4 1 4 1 5 7 8 7 4
5 0 0 1 1 0 1 5 0 1 1 1 3 0 5 1 1 5 4 2 3 5 1 6 7 7 12 2
6 0 0 0 0 1 0 6 0 0 1 1 0 1 6 0 1 1 1 3 0 6 1 1 5 4 2 3
X X2 X3 X4

5 June 2016 (c) 2016 Stephen P Borgatti 19


Products of matrices & their transposes
XX = pre-multiplying X by its transpose
( X ' X ) ij = xki xkj
k

Computes sums of products of each pair of columns (cross-products)


The basis for most similarity measures
1 2 3 4 1 2 3 4
Mary 0 1 1 1 1 1 0 1 0
2 0 1 1 1
Bill 1 0 1 0
3 1 1 2 1
John 0 0 0 1 4 0 1 1 2
Larry 0 0 0 0

5 June 2016 (c) 2016 Stephen P Borgatti 20


Products of matrices & their transposes
XX = product of matrix X by its transpose
( X ' X ) ij = xik x jk
k

Computes sums of products of each pair of rows (cross-products)


Similarities among rows
1 2 3 4 Mary Bill John Larry
Mary 0 1 1 1 Mary 3 1 1 0
Bill 1 0 1 0 Bill 1 2 0 0
John 0 0 0 1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IA 1 0 1 0 0 0 (c) 2016
0 Stephen
1 1 P1Borgatti
1 1 1 2 1 1 2 2 22
FLORA 1 0 1 0 0 0 0 1 1 1 1 1 1 2 1 1 2 2
Summations marginals of a table
Row
Mary Bill John Larry
Row sums ri = xi + =
Marginals
xij Mary 0 1 1 1 3
j
Bill 1 0 1 0 2
c j = x+ j = xij John 0 0 0 1 1
Column sums i
Larry 0 0 0 0 0
Column
m = x+ + = xij Marginals 1 1 2 2 6
Matrix sums i, j

UCINET command line:


r = sum(campnet row)
c = sum(campnet col)
m = sum(campnet)

5 June 2016 (c) 2016 Stephen P Borgatti 23


Summations marginals of a 3-way matrix
Conference
(cols, j)
0 0 0 1 1 0 0 0
0 0 00 10 10 00 00 00 0 0
0 0 00 10 100 000 000 001 01 00 1 0
0 0 00 01 001 000 000 010 010 000 10 01 1 1
0 0 00 00 000 100 101
0 000 101 010 10 11 0 0
0 0 00 01 011 000 010
1 100 100 111 01 00 0 1
0 0 10 00 100 001 000
1 110
1 011 001 01 10 0 0
Person 1 0 01 00 000 101 110 010 010 101 00 01 1 0
(rows, i) 0 0 00 01 101 100 100 011 00 01 1 0
0 0 01 01 01 10 00 10 1 0
Dataset X
0 0 0 1 0 1 1 0

5 June 2016 (c) 2016 Stephen P Borgatti 24


Summations marginals of a 3-way matrix
Person
(cols, j) Dataset X is the result of a CSS survey design where each
0 0 0 1 1 0 0 0 person in the group was asked their perception of who goes
0 0 00 10 10 00 00 00 0 0 to whom for advice, so if = 1 if respondent k thinks that
0 0 00 10 100 000 000 001 01 00 1 0 person i goes to person j for advice.
0 0 00 01 001 000 000 010 010 000 10 01 1 1
0 0 00 00 000 100 101
0 000 101 010 10 11 0 0
0 0 00 01 011 000 010
1 100 100 111 01 00 0 1 =
0 0 10 00 100 001 000
1 110
1 011 001 01 10 0 0
Person 1 0 01 00 000 101 110 010 010 101 00 01

1 0
(rows, i) 0 0 00 01 101 100 100 011 00 01 1 0
gives the number of respondents who think i goes to j for
0 0 01 01 01 10 00 10 1 0
Dataset X advice. In UCINET,
0 0 0 1 0 1 1 0
y = sum(x row col)

5 June 2016 (c) 2016 Stephen P Borgatti 25


Row

Normalizing Mary
Mary
0
Bill John Larry
1 1 1
Sums
3
Bill 1 0 1 0 2
John 0 0 0 1 1
Converting to proportions
xij Larry 0 0 0 0 0
x =
*
Rows ij
ri Column
xij Marginals 1 1 2 2 6
xij* =
Columns cj Row
Mary Bill John Larry sums
Mary 0 .33 .33 .33 1
where ri gives the sum of row i Bill .5 0 .5 0 1
John 0 0 0 1 1
Larry
In UCINET command line:
->r = rowstochastic(x) Column
->c = colstochastic(x) Marginals .5 .33 .83 1.33 3
5 June 2016 (c) 2016 Stephen P Borgatti 26
Normalizing cont.
Converting to z-scores (standardizing)
Columns xij u j where uj gives the mean of
x =
*
column j, and j is the std
UCINET (version 6.515 or later) ij
j deviation of column j
->y = zscore(campnet col)

Var 1 Var 2 Var 3 Var 4 Var 1 Var 2 Var 3 Var 4


Mary 3 20 25 10 Mary 1.34 -0.38 1.34 -0.38
Bill 1 55 15 45 Bill -0.45 1.44 -0.45 1.44
John 0 32 10 22 John -1.34 0.25 -1.34 0.25
Larry 2 2 20 -8 Larry 0.45 -1.31 0.45 -1.31

Mean 1.5 27.3 17.5 17.3 Mean 0.00 0.00 0.00 0.00
Std Dev 1.1 19.3 5.6 19.3 Std Dev 1.00 1.00 1.00 1.00

5 June 2016 (c) 2016 Stephen P Borgatti 27


Transposes
The transpose of a matrix is the matrix with rows and columns
interchanged
The rows become columns and the columns become rows
So the transpose of an m by n matrix is an n by m matrix.
Here is the matrix presented on the last side, and its transpose
The transpose of matrix M is indicated by M or MT
1 2 3 4
A B C D E
A 0 0 2 6
1 0 6 6 2 0
2 0 3 3 1 0 B 6 3 0 4
3 2 0 0 3 0 C 6 3 0 4
4 6 4 4 7 4
D 2 1 3 7
E 0 0 0 4
Matrix M
5 June 2016 (c) 2016 Stephen P Borgatti 28
Its transpose, M
Transpose adjacency matrix
Interchanging rows/columns of adjacency matrix effectively reverses
the direction of ties
Mary Bill John Larry Mary Bill John Larry
Mary 0 1 0 1 Mary 0 1 0 1
Bill 1 0 0 1 Bill 1 0 1 0
John 0 1 0 0 John 0 0 0 1
Larry 1 0 1 0 Larry 1 1 0 0

Gives money to Gets money from

bill bill
mary mary

john john
larry larry
5 June 2016 (c) 2016 Stephen P Borgatti 29
Dichotomizing
X is a valued matrix, say 1 to 10 rating of strength of tie
Construct a matrix Y of ones and zeros so that
yij = 1 if xij > 5, and yij = 0 otherwise
X Y
EVE LAU THE BRE CHA EVE LAU THE BRE CHA
EVELYN 8 6 7 6 3 EVELYN 1 1 1 1 0
LAURA 6 7 6 6 3 LAURA 1 1 1 1 0
THERESA 7 6 8 6 4 THERESA 1 1 1 1 0 xij > 5
BRENDA 6 6 6 7 4 BRENDA 1 1 1 1 0
CHARLOTTE 3 3 4 4 4 CHARLOTTE 0 0 0 0 0
Ucinet
->dcamp = dichot(camp92 le 3)
Key question is what cutoff to use for dichotomizing

5 June 2016 (c) 2016 Stephen P Borgatti 30


B

At what level to dichotomize A C

If the matrix values are from a scale like 5 = every day, 4 = every
few days, 3 = once a week etc., you can choose based on
ethnographic info or theory
Choose level that best conforms to Granovetters view of strong ties
Strong ties A--B & B--C implies at least a weak tie from A to C
So choose level that maximizes Granovetter transitivity Each of these
Networks|subgroups|f-groups implicitly
Choose level that yields best results in terms of correlations of network involves
variables with outcome variables dichotomizing
E.g., dichotomize such that the corr of betweenness with salary is maximized at all possible
Choose level such that the correlation between dichotomized matrix and levels and
your original valued matrix is as high as possible i.e., minimize distortion choosing the
Transform|Interactive Dichotomize best one

5 June 2016 (c) 2016 Stephen P Borgatti 31


Symmetrizing
When to symmetrize
The social relation is logically symmetric but your empirical data are not (e.g.,
either i or j failed to mention the other, so xij xji)
Symmetrizing relations that are not logically symmetric, such as father of,
can make sense if you change the name of the relation (e.g., is in a father-son
relationship with, or is kin with)
Some concepts/techniques in SNA dont work with non-symmetric data.
E.g., multidimensional scaling which represent nodes on a Euclidean plane, where the
distance from A to B has to be same as from B to A
Can symmetrize both 0/1 data and valued data

5 June 2016 (c) 2016 Stephen P Borgatti 32


Ways to symmetrize
Set yij and yji to maximum(xij, xji) {union rule}
Most often used, but increases density
Makes sense when the reason for asymmetry is faulty recall or hiding relation
Minimum (xij, xji) {intersection rule}
Useful for reducing density, but can create disconnected network
Eliminates social desirability effects (Im friends with everybody)
Sometimes used to define a strong tie
Average: (xij + xji)/2
Useful when the data are valued, but questionable when used with 0/1 data
(whats a half a tie?)

5 June 2016 (c) 2016 Stephen P Borgatti 33


Symmetrizing Example
X is non-symmetric
(and happens to be valued)
Construct matrix Y such that
yij and yji = maximum of xij and xji
X
ROM BON AMB BER PET LOU ROM BON AMB BER PET LOU
ROMUL_10 0 1 1 0 3 0 ROMUL_10 0 1 1 0 3 0
BONAVEN_5 0 0 1 0 3 2 BONAVEN_5 1 0 1 1 3 2
AMBROSE_9 0 1 0 0 0 0 AMBROSE_9 1 1 0 2 0 0
BERTH_6 0 1 2 0 3 0 BERTH_6 0 1 2 0 3 0
PETER_4 0 3 0 1 0 2 PETER_4 3 3 0 3 0 2
LOUIS_11 0 2 0 0 0 0 LOUIS_11 0 2 0 0 2 0

Symmetrized by Maximum
5 June 2016 (c) 2016 Stephen P Borgatti 34
Elementwise matrix arithmetic
Adding matrices
Example: Sampson data has 4 positive relations: Liking, Esteem, Influence,
and Praise and 4 negative relations: Dislike, Disesteem, Negative Influence,
and Blame
Can add the positives to create a single positive relation, and add the
negatives to create a single negative relation
Results would be valued, but could dichotomize if needed
In ucinet command line
unpack Sampson //requires Ucinet 6.515 or later
positive = add(samplk3 sampes sampan samppr)

5 June 2016 (c) 2016 Stephen P Borgatti 35


Elementwise matrix arithmetic
Matrix intersections
Suppose you have asked each person to judge how similar they are to every
other person in a group
You want to use this as a proxy for strength of tie, but only if the person
knows the other person
So you multiple, elementwise, the acquaintance matrix with the similarity
matrix
In ucinet command line
strengthoftie = mult(acquaint simil)

5 June 2016 (c) 2016 Stephen P Borgatti 36


Cellwise Binary Operators
Sum (Addition)
C = A + B where cij = aij + bij
Elementwise (Cellwise) Multiplication
C = A * B where cij = aij * bij
Boolean operations
C = A B (Logical And) where cij = aij bij
C = A B (Logical Or) where cij = aij bij

5 June 2016 (c) 2016 Stephen P Borgatti 37

You might also like