Skip to content

Vectors Matrices#

Let's start with Vector and Matrix Algebra and build the foundation step by step. We'll cover theory, examples, and exercises. Here's an outline of how we'll proceed:


1. Vector and Matrix Algebra#

Key Topics:#

  • Definitions and properties of vectors and matrices
  • Vector operations (addition, scalar multiplication, dot product, cross product)
  • Matrix operations (addition, multiplication, transpose)
  • Special matrices (identity, diagonal, symmetric, etc.)
  • Applications in geometry and data representation

Learning Plan:#

  1. Introduction to Vectors:
  2. Theory: Basics, magnitude, unit vectors
  3. Practice: Solve problems involving vector addition and scalar multiplication.

  4. Dot Product and Cross Product:

  5. Theory: Definitions, geometric interpretations
  6. Practice: Compute dot and cross products; interpret results in geometric terms.

  7. Introduction to Matrices:

  8. Theory: Definitions, types of matrices
  9. Practice: Perform basic matrix operations like addition, scalar multiplication, and transpose.

  10. Matrix Multiplication:

  11. Theory: Rules and properties, row-by-column rule
  12. Practice: Compute matrix products and verify properties.

  13. Geometric and Practical Applications:

  14. Representing transformations like rotation and scaling using matrices.

Would you like to start with vectors? I can explain the theory, provide real-world applications, and include problems for practice.


1. Introduction to Vectors#

1.1 What is a Vector?#

A vector is a mathematical object that has both magnitude (size) and direction. It is often represented as an arrow in space. For example:
- A car moving at 60 km/h in a specific direction can be represented as a vector.
- Forces acting on an object are vectors because they have magnitude and direction.

1.2 Representation of Vectors#

  • A vector in 2D space is written as v=[v1,v2].
  • In 3D space: v=[v1,v2,v3].

Example:
In 2D, v=[3,4] represents a vector with a horizontal component of 3 and a vertical component of 4.

1.3 Magnitude of a Vector#

The magnitude (or length) of a vector v=[v1,v2,...,vn] is given by:
[
|\mathbf{v}| = \sqrt{v_1^2 + v_2^2 + ... + v_n^2}
]

Example:
For v=[3,4],
[
|\mathbf{v}| = \sqrt{3^2 + 4^2} = \sqrt{9 + 16} = 5
]

1.4 Unit Vector#

A unit vector has a magnitude of 1. You can find a unit vector v^ in the direction of v by dividing it by its magnitude:
[
\hat{\mathbf{v}} = \frac{\mathbf{v}}{|\mathbf{v}|}
]

Example:
For v=[3,4],
[
\hat{\mathbf{v}} = \frac{[3, 4]}{5} = [\frac{3}{5}, \frac{4}{5}]
]


1.5 Operations on Vectors#

Addition of Vectors#

If u=[u1,u2] and v=[v1,v2], then:
[
\mathbf{u} + \mathbf{v} = [u_1 + v_1, u_2 + v_2]
]

Example:
u=[2,3], v=[4,1]:
[
\mathbf{u} + \mathbf{v} = [2 + 4, 3 + 1] = [6, 4]
]

Scalar Multiplication#

If c is a scalar and v=[v1,v2], then:
[
c \mathbf{v} = [c v_1, c v_2]
]

Example:
c=3, v=[2,3]:
[
3 \mathbf{v} = [3 \cdot 2, 3 \cdot 3] = [6, 9]
]


Practice Problems#

  1. Find the magnitude of the vector v=[5,12].
  2. Normalize v=[6,8] to find its unit vector.
  3. Add the vectors u=[1,2] and v=[3,4].
  4. Multiply the vector v=[7,9] by the scalar c=0.5.

Would you like solutions for these, or should we explore more advanced topics like the dot product?


Solutions to Practice Problems#

1. Find the magnitude of the vector v=[5,12]:#

Using the formula for magnitude:
[
|\mathbf{v}| = \sqrt{v_1^2 + v_2^2}
]
Substitute v1=5 and v2=12:
[
|\mathbf{v}| = \sqrt{5^2 + 12^2} = \sqrt{25 + 144} = \sqrt{169} = 13
]

Answer: The magnitude is 13.


2. Normalize v=[6,8] to find its unit vector:#

First, find the magnitude of v:
[
|\mathbf{v}| = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10
]

The unit vector is:
[
\hat{\mathbf{v}} = \frac{\mathbf{v}}{|\mathbf{v}|} = \frac{[6, 8]}{10} = [\frac{6}{10}, \frac{8}{10}] = [0.6, 0.8]
]

Answer: The unit vector is [0.6,0.8].


3. Add the vectors u=[1,2] and v=[3,4]:#

u+v=[1+3,2+4]=[4,6]

Answer: u+v=[4,6].


4. Multiply the vector v=[7,9] by the scalar c=0.5:#

cv=[0.57,0.59]=[3.5,4.5]

Answer: 0.5v=[3.5,4.5].


Next Steps: Dot Product and Geometric Applications#

Would you like to proceed with the dot product and its applications, or explore real-world use cases of these operations?


2. Dot Product and Cross Product of Vectors#

2.1 Dot Product#

The dot product of two vectors u=[u1,u2,...,un] and v=[v1,v2,...,vn] is defined as:
[
\mathbf{u} \cdot \mathbf{v} = u_1v_1 + u_2v_2 + ... + u_nv_n = \sum_{i=1}^n u_i v_i
]

Geometric Interpretation#

The dot product can also be written as:
[
\mathbf{u} \cdot \mathbf{v} = |\mathbf{u}| |\mathbf{v}| \cos\theta
]
where θ is the angle between the vectors.
- If θ=0: cosθ=1, and the vectors are parallel.
- If θ=90: cosθ=0, and the vectors are orthogonal (perpendicular).

Properties of the Dot Product#
  1. Commutative: uv=vu
  2. Distributive: u(v+w)=uv+uw
  3. Scalar multiplication: (cu)v=c(uv)
Example Calculation#

If u=[2,3] and v=[4,1]:
[
\mathbf{u} \cdot \mathbf{v} = (2 \cdot 4) + (3 \cdot 1) = 8 + 3 = 11
]


2.2 Cross Product (Only for 3D Vectors)#

The cross product of two 3D vectors u=[u1,u2,u3] and v=[v1,v2,v3] is a vector defined as:
[
\mathbf{u} \times \mathbf{v} =
|ijk u1u2u3 v1v2v3|
= \mathbf{i}(u_2v_3 - u_3v_2) - \mathbf{j}(u_1v_3 - u_3v_1) + \mathbf{k}(u_1v_2 - u_2v_1)
]
where i,j,k are the unit vectors along the x, y, and z-axes.

Geometric Interpretation#

The cross product results in a vector that is:
1. Perpendicular to both u and v.
2. Has a magnitude equal to the area of the parallelogram formed by u and v:
[
|\mathbf{u} \times \mathbf{v}| = |\mathbf{u}| |\mathbf{v}| \sin\theta
]

Example Calculation#

If u=[1,2,3] and v=[4,5,6]:
[
\mathbf{u} \times \mathbf{v} =
|ijk 123 456|
= \mathbf{i}((2)(6) - (3)(5)) - \mathbf{j}((1)(6) - (3)(4)) + \mathbf{k}((1)(5) - (2)(4))
]
[
= \mathbf{i}(12 - 15) - \mathbf{j}(6 - 12) + \mathbf{k}(5 - 8)
]
[
= -3\mathbf{i} + 6\mathbf{j} - 3\mathbf{k}
]
[
\mathbf{u} \times \mathbf{v} = [-3, 6, -3]
]


Practice Problems#

  1. Find the dot product of u=[3,4] and v=[5,2].
  2. If u=[1,0,1] and v=[2,3,1], compute uv and interpret it.
  3. Calculate the cross product of u=[2,3,4] and v=[5,6,7].
  4. Given u=[1,1] and v=[1,1], determine if the vectors are orthogonal.

Let me know if you'd like solutions to these or if you'd prefer to move to matrix operations next!


Solutions to Practice Problems#

1. Add the matrices:#

A=[2468],B=[1357]

Matrix addition is performed element-wise:
[
A + B = [2+14+3 6+58+7] =
[37 1115]
]

Answer:
[
A + B = [37 1115]
]


2. Multiply the matrix by a scalar:#

A=[1234],c=1

Scalar multiplication is performed element-wise:
[
cA = [1112 1314] =
[12 34]
]

Answer:
[
cA = [12 34]
]


3. Compute the product of the matrices:#

A=[1234],B=[5678]

Matrix multiplication is computed as:
[
C = AB = [(15+27)(16+28) (35+47)(36+48)]
]

Calculate element-wise:
[
C = [5+146+16 15+2818+32] =
[1922 4350]
]

Answer:
[
C = [1922 4350]
]


4. Find the transpose of the matrix:#

A=[123456]

The transpose of A is obtained by swapping rows and columns:
[
A^T = [14 25 36]
]

Answer:
[
A^T = [14 25 36]
]


Next Steps: Determinants and Matrix Inverses#

Would you like to proceed with the determinants and how they relate to matrix inverses, or explore real-world applications of these concepts?


4. Determinants and Matrix Inverses#

4.1 Determinant of a Matrix#

The determinant is a scalar value that is computed from a square matrix. It provides essential information about the matrix, such as whether it is invertible and its geometric properties.

4.1.1 Determinant of a 2x2 Matrix#

For a 2×2 matrix:
[
A = [ab cd]
]
The determinant is:
[
\text{det}(A) = |A| = ad - bc
]

Example:
For A=[3846]:
[
\text{det}(A) = (3)(6) - (8)(4) = 18 - 32 = -14
]


4.1.2 Determinant of a 3x3 Matrix#

For a 3×3 matrix:
[
A = [abc def ghi]
]
The determinant is computed as:
[
\text{det}(A) = a(ei - fh) - b(di - fg) + c(dh - eg)
]

Example:
For A=[123456789]:
[
\text{det}(A) = 1((5)(9) - (6)(8)) - 2((4)(9) - (6)(7)) + 3((4)(8) - (5)(7))
]
[
\text{det}(A) = 1(45 - 48) - 2(36 - 42) + 3(32 - 35)
]
[
\text{det}(A) = -3 + 12 - 9 = 0
]

This matrix is not invertible because its determinant is 0.


4.2 Inverse of a Matrix#

The inverse of a square matrix A, denoted A1, is a matrix such that:
[
A A^{-1} = A^{-1} A = I
]
where I is the identity matrix.

4.2.1 Inverse of a 2x2 Matrix#

For a 2×2 matrix:
[
A = [ab cd]
]
The inverse is given by:
[
A^{-1} = \frac{1}{\text{det}(A)} [db ca], \quad \text{if } \text{det}(A) \neq 0
]

Example:
For A=[3846], det(A)=14:
[
A^{-1} = \frac{1}{-14} [68 43] = [3747 27314]
]


4.2.2 Conditions for Invertibility#

A square matrix A is invertible if and only if det(A)0.


Practice Problems#

  1. Find the determinant of the matrix:
    [
    A = [23 14]
    ]

  2. Compute the determinant of:
    [
    B = [102 345 678]
    ]

  3. Check if the matrix is invertible and find its inverse if possible:
    [
    C = [12 34]
    ]

  4. Prove that a matrix with determinant 0 is singular (not invertible) by finding the determinant of:
    [
    D = [12 24]
    ]

Would you like solutions to these problems, or should we move to systems of linear equations and their solutions?