ece108: add cross product

This commit is contained in:
eggy 2023-01-30 17:38:11 -05:00
parent 094e672245
commit 2512af4c38

View File

@ -395,6 +395,10 @@ $$
\overline S=\mathcal U-S
$$
The intersection and union operators have the same properties as **AND** and **OR** and so are equally commutative / associative.
**De Morgan's laws** still hold with sets.
### Intervals
An interval can be represented as a bounded set.
@ -402,3 +406,23 @@ An interval can be represented as a bounded set.
$$[a,b)=\{x\in\mathcal U|a\leq x\wedge x<b\}$$
$\empty$ is any impossible interval.
## Ordered pairs
!!! definition
- A **binary relation** on two sets $A, B$ is a subset of their Cartesian product.
- An ***n*-ary relation** between $n$ sets is a subset of their *n*-Cartesian product.
Also known as **tuples**, ordered pairs are represented by angle brackets.
$$\left<a,b\right> = \left<c,d\right>\iff (a=c)\wedge(b=d)$$
The **Cartesian product** of two sets is the set of all ordered pair combinations within the two sets.
$$A\times B=\{\left<a,b\right> | (a\in A)\wedge (b\in B)\}$$
It is effectively the cross product, so is not commutative, although distributing unions, intersections, and differences works as expected.
The **n-Cartesian product** of $n$ sets expands the Cartesian product.
$$A\times B\times\dots\times Z=\{\left<a, b,\dots z\right>|a\in A, b\in B,\dots,z\in Z\}$$