Fix a vertex order. Entry M[i,j] is in row i and column j. For a simple graph it records adjacency as 0 or 1; for a loop-free multigraph it can record the number of parallel edges. Matrix multiplication is explained in this lesson, not assumed as a prerequisite.
Two vertices are adjacent if an edge joins them directly. Being reachable by several edges is a different condition. For an undirected graph, reversing an edge’s endpoint names does not create a new edge.
Definitions and notation for this topicMatrix of a finite relation
M[a,b]
For R⊆A×B on finite ordered sets, M[a,b]=1 if (a,b)∈R and 0 otherwise. State the row order A and column order B.
An entry represents a particular ordered pair. A multigraph adjacency matrix may count parallel edges and therefore have entries greater than 1; that is a different convention.
Separate glossary example
For A=(1,2), B=(u,v), R={(1,v),(2,u)}, the matrix is [[0,1],[1,0]].
A loop has the same endpoint twice. Parallel edges are distinct edges with the same endpoints. For an undirected multigraph, retain each edge’s identity and endpoint pair.
A simple undirected graph excludes both loops and parallel edges. The degree convention does not by itself specify how a matrix should record loops; state the matrix convention explicitly.
Separate glossary example
e₁=AB and e₂=AB are two edges, not one duplicated set entry. A loop e₃=AA contributes two to deg(A).
For a finite loop-free undirected multigraph with fixed vertex order, M_ij is the number of edges between vertices i and j. The diagonal is zero and M is symmetric.
For a simple graph entries are 0 or 1. A directed graph uses a row-to-column direction and need not give a symmetric matrix. Loop-diagonal conventions must be stated separately.
Separate glossary example
Two vertices (A,B) joined by two parallel edges have M=[[0,2],[2,0]].
For the adjacency matrix of a finite simple graph, (M²)_ij counts walks of length two from i to j, summed over possible intermediate vertices k.
These are walks, not necessarily paths: returning to a previous vertex is allowed. More generally (M^r)_ij counts length-r walks for nonnegative integer r; M⁰ is the identity matrix.
Separate glossary example
In the path 1—2—3, (M²)_13=1 from 1—2—3, and (M²)_11=1 from 1—2—1.
For a vertex bijection f from G to H, put P_uv=1 when f(u)=v and 0 otherwise, with rows in G order and columns in H order. For the same adjacency convention, M_H=PᵀM_GP expresses preserved adjacency.
Pᵀ swaps P’s row and column indices. Right multiplication reorders columns and left multiplication by Pᵀ reorders rows. Reversing the convention for P changes the displayed identity; the matrix does not name an edge bijection.
Separate glossary example
If G order is (1,2,3), H order is (p,q,r), and f(1)=r,f(2)=p,f(3)=q, then P=[[0,0,1],[1,0,0],[0,1,0]].
How to build an argument: methods and reasonsBefore writing: assumptions, goals and established facts (§4.2)
Assumption: a stated hypothesis or an explicitly temporary premise. Identify its domain.
Goal: what remains to be shown. It is not available as a reason for a later step.
Established: a statement derived from hypotheses, definitions, earlier steps or an applicable theorem. Name that reason.
Introduce witnesses when their existence is justified; give different arbitrary quantities different variables. Finish by matching the result to the original goal.
When to choose: Use it when the negation creates incompatible established facts.
Assume the hypotheses and the negation of the desired conclusion; derive a contradiction.
Start: State exactly what is temporarily assumed for contradiction.
Finish: Name the conflicting statements and discharge the assumption.
Worked example with reasons
Goal
2∣n2⇒2∣n
Prove the statement for every integer n.
Reason: This is Proposition 4.7.4.
Assumption
2∣n2,2∤n
Assume a counterexample: n² is even but n is not even.
Reason: Negating the universal conditional gives one integer satisfying the hypothesis and negating the conclusion. Every integer is either even or odd.
Established
n=2k+1,k∈Z
Introduce an integer k.
Reason: Definition of odd.
Established
n2=(2k+1)2=4k2+4k+1=2(2k2+2k)+1
The square is odd.
Reason: Algebra and closure of integers show 2k²+2k is an integer; then use the definition of odd.
Established
2∣n2∧2∤n2
This is impossible; the assumed counterexample cannot exist.
Reason: No integer is both even and odd (Theorem 4.7.2). Discharging the contradictory assumption proves the original claim.
When to choose: Use it to identify precisely what would make a quantified claim false, especially before a counterexample or contradiction.
Negate one outer quantifier at a time, preserving variable order, domains and the scope of the predicate.
Start: Mark the scope of each quantifier; move the negation inward one rule at a time.
Finish: Read the final statement and check that it describes failure of the original claim. Equivalence does not by itself prove either statement true.
Worked example with reasons
Goal
¬∀x∈D∃y∈EP(x,y)
Rewrite the negation without changing its meaning.
Reason: The domains D and E remain fixed throughout.
Established
∃x∈D¬∃y∈EP(x,y)
There is an x for which the inner existential statement fails.
Reason: Negation of a universal quantifier: ¬∀x R(x) ⇔ ∃x ¬R(x).
Established
∃x∈D∀y∈E¬P(x,y)
For that same x, every y fails P.
Reason: Negation of an existential quantifier: ¬∃y P(x,y) ⇔ ∀y ¬P(x,y). The order ∃x∀y is preserved.
Both are statements established by proof. The name often signals how a text organizes or emphasizes a result, not a different degree of truth.
Lemma
A proved auxiliary result used in another argument. For example, −|r|≤r≤|r| for real r supports later bounds. If r≥0, |r|=r and −r≤r; if r<0, |r|=−r and r≤−r. These cases cover every real r.
Lemma 4.5.4, printed p. 207 / PDF 231
Corollary
A result derived from an established theorem. If r is rational, r+r is rational by closure of rational numbers under addition (Theorem 4.3.2); because 2r=r+r, its double is rational.
Example 4.3.4, printed p. 187 / PDF 211; printed box: Corollary 4.2.3
Keep the domain conditions
With Epp’s definition, d divides 0 for every nonzero integer d: 0=d·0. Do not omit d≠0.
Prime and composite classifications here concern integers n>1. “Not prime” alone does not make 0, 1 or a negative integer composite.
§10.2 · Read a matrix rowLevel 2
A simple undirected graph has adjacency matrix M=[[0,1,1,0],[1,0,1,1],[1,1,0,0],[0,1,0,0]] in vertex order A,B,C,D. Find the degree of B.
Enter an integer result. Put any explanation in the reasoning field below.
Symbols
Check answer checks the result above. Your reasoning is saved, not automatically graded; compare it with the walkthrough.