Linear Algebra

These are topics learned in linear algebra (I took MATH 115) which is a course I took back in 1A.

A set is a collection of elements. For example, the set contains elements 2, 4, and 7.

is used to denote the empty set and denotes the size of a set.

You can do set operations like:

  • Intersection
  • Union
  • Complement ( which depends on the universal set (elements of the universal set not in A))
  • Difference

You can also take subsets, where is each element of belongs to set , then is a subset of . A set always has subsets which includes .

Implementations of Set

In Java

  • HashSet: Fast and unordered (uses .equals())
  • TreeSet: Sorted set (uses .equals())
  • LinkedHashSet: Ordered by insertion (uses .equals())
  • IdentityHashSet: Unordered (uses ==)