# Assignment 1
## • Vector Operations
### ° Dot Product Example:
The dot product of two vectors **A** = [a1, a2] and **B** = [b1, b2] is calculated as:
**A** · **B** = a1\*b1 + a2\*b2
This results in a scalar value.
### ° Calculating Direction and Magnitude:
- **Magnitude**: For a vector **A** = [a1, a2], the magnitude (or length) is given by:
$$
\|\mathbf{a}\| = \sqrt{a1^2 + a2^2}
$$
- **Direction**: The direction can be found using the angle θ with respect to the positive x-axis:
$$
θ = arctan(a2 / a1)
$$
## • Trigonometric Definitions
### ° Relationship Between Polar and Cartesian Coordinates:
To convert from Cartesian coordinates (x, y) to polar coordinates (r, θ):
- r = $sqrt(x^2 + y^2)$
- θ = $arctan(y / x)$
## • Solving Linear Equations in Vector and Matrix Format
### ° Example with 2x2 Matrix:
Given the system of linear equations:
2x + 3y = 5
4x - y = 3
This can be written in matrix format as:
[2 3] [x] = [5]
[4 -1] [y] [3]
## • Reducing Matrices
### ° Row Reduction Example (2x2 Matrix):
Consider the matrix:
[1 2]
[3 4]
To reduce this to row echelon form:
- Subtract 3 times the first row from the second row:
[1 2]
[0 -2]
- Finally, divide the second row by -2:
[1 2]
[0 1]
## • Linear Combinations
### ° Definition and Calculation:
A linear combination of vectors **v1**, **v2**, ..., **vn** is an expression of the form:
c1\*v1 + c2\*v2 + ... + cn\*vn
where c1, c2, ..., cn are scalars.
### ° Linear Combination with Non-linear Functions:
Linear combinations typically involve linear functions, but if using non-linear functions (e.g., log(x)), the expression would no longer be a "linear" combination.
## • Linear (In)dependence
### ° Using Vectors to "Create" Another Vector:
Vectors **v1**, **v2**, and **v3** are linearly independent if no vector can be expressed as a linear combination of the others. If:
v3 = c1\*v1 + c2\*v2
then the vectors are linearly dependent.
### ° What Does "Span" Mean?
The span of a set of vectors is the set of all possible linear combinations of those vectors. For example, the span of vectors **v1** and **v2** is the set of all vectors that can be written as:
c1\*v1 + c2\*v2
## • Matrix Operations
### ° Matrix-Vector Multiplication:
When multiplying a matrix **A** by a vector **x**:
**Ax** = Linear combination of the columns of **A** weighted by the components of **x**