Achievable logoAchievable logo
FE Civil
Sign in
Sign up
Purchase
Textbook
Practice exams
Support
How it works
Resources
Exam catalog
Mountain with a flag at the peak
Textbook
Introduction
1. Mathematics
1.1 Coordinate geometry
1.2 Geometric feature and trigonometry
1.3 Algebra
1.4 Calculus
1.5 Matrices and Vectors
2. Combinatorics, probability and statistics
3. Ethics and professional practice
4. Engineering economics
5. Statics
6. Materials
7. Dynamics
8. Mechanics of materials
9. Fluid mechanics
10. Soil mechanics
11. Structural engineering
12. Concrete structure design
13. Water resources engineering
14. Environmental engineering
15. Transportation engineering
16. Surveying
17. Construction engineering
Wrapping up
Achievable logoAchievable logo
1.5 Matrices and Vectors
Achievable FE Civil
1. Mathematics

Matrices and Vectors

12 min read
Font
Discuss
Share
Feedback

This chapter covers the following topics:

  • Matrices and their operations
  • Vectors
  • Gradient, divergence, and curl
  • Identities
  • Newton’s method for root extraction
  • Trapezoidal rule for numerical integration
  • Simpson’s rule for numerical integration

Most of the formulas in this chapter - the determinant, matrix inverse, dot/cross product, and Newton’s-method formulas among them - appear in the mathematics section of the NCEES FE Reference Handbook, which is provided during the exam. Since you’ll have it open, focus on knowing where to find each formula rather than memorizing it.

Matrices and their operations

A matrix is a rectangular array of numbers arranged in rows and columns. We usually write an m×n matrix (with m rows and n columns) as:

A=​a11​a21​⋮am1​​a12​a22​⋮am2​​……⋱…​a1n​a2n​⋮amn​​​

Addition and subtraction

You can add or subtract two matrices only if they have the same dimensions. The operation is done element by element:

C=A±B=​a11​±b11​a21​±b21​⋮am1​±bm1​​a12​±b12​a22​±b22​⋮am2​±bm2​​……⋱…​a1n​±b1n​a2n​±b2n​⋮amn​±bmn​​​

Matrix multiplication

Matrix multiplication is not done element by element. Instead, each entry of the product comes from a row-by-column dot product.

C=AB

If A is an m×p matrix and B is a p×n matrix, then C is an m×n matrix, and each entry is

cij​=k=1∑p​aik​bkj​

Matrix multiplication is defined only when the number of columns of A matches the number of rows of B.

Example: multiplying two 2×2 matrices

Find AB for A=[13​24​] and B=[57​68​].

Each entry of AB comes from a row-by-column dot product:

AB=[(1)(5)+(2)(7)(3)(5)+(4)(7)​(1)(6)+(2)(8)(3)(6)+(4)(8)​]=[1943​2250​]

Answer: AB=[1943​2250​]

Determinant of a matrix

The determinant is defined for square matrices. It produces a single number that is used in several places, including checking whether a matrix is invertible.

For a 2×2 matrix:

det(A)=​ac​bd​​=ad−bc

For a 3×3 matrix:

det(A)=​a11​a21​a31​​a12​a22​a32​​a13​a23​a33​​​=a11​​a22​a32​​a23​a33​​​−a12​​a21​a31​​a23​a33​​​+a13​​a21​a31​​a22​a32​​​

Inverse of a matrix

A square matrix A has an inverse only if its determinant is nonzero (that is, det(A)=0). For a 2×2 matrix A=[ac​bd​], the inverse is found by swapping the diagonal entries, negating the off-diagonal entries, and dividing by the determinant:

A−1=ad−bc1​[d−c​−ba​]

Example: inverting a 2×2 matrix

Find A−1 for A=[42​31​].

First, compute the determinant: det(A)=(4)(1)−(3)(2)=4−6=−2.

Since det(A)=0, the inverse exists:

A−1=−21​[1−2​−34​]=[−0.51​1.5−2​]

Answer: A−1=[−0.51​1.5−2​]

Identity matrix

An identity matrix is a square matrix with ones on the diagonal and zeros everywhere else:

In​=​10⋮0​01⋮0​……⋱…​00⋮1​​

It acts like the number 1 in matrix multiplication:

AI=IA=A

Properties of matrices

  1. Associative property: (AB)C=A(BC)
  2. Distributive property: A(B+C)=AB+AC
  3. Commutative property (addition): A+B=B+A
  4. Transpose of a product: (AB)T=BTAT
  5. Inverse property: AA−1=A−1A=I

This section has outlined the main matrix operations and the key definitions used with square matrices.

Vectors

A vector is a quantity that has both magnitude and direction. In three dimensions, a vector is often written in component form as:

A=a1​i^+a2​j^​+a3​k^

Where:

  • a1​,a2​,a3​ are the components of the vector in the x, y, and z directions.
  • i^,j^​,k^ are unit vectors in the x, y, and z directions, respectively.

Vector addition and subtraction

Addition

Vector addition combines components in the same direction:

A+B=(a1​+b1​)i^+(a2​+b2​)j^​+(a3​+b3​)k^

Subtraction

Vector subtraction subtracts components in the same direction:

A−B=(a1​−b1​)i^+(a2​−b2​)j^​+(a3​−b3​)k^

Example: magnitude of a resultant vector

Two vectors are given by A=3i^ and B=4j^​. Find the magnitude of the resultant vector R=A+B.

R=A+B=3i^+4j^​

The magnitude of a vector V=v1​i^+v2​j^​+v3​k^ is ∣V∣=v12​+v22​+v32​​, so:

∣R∣=32+42​=9+16​=25​=5

Answer: ∣R∣=5

Dot product (scalar product)

The dot product of two vectors produces a scalar. It can be defined using magnitudes and the angle θ between the vectors:

A⋅B=∣A∣∣B∣cosθ

Or computed directly from components:

A⋅B=a1​b1​+a2​b2​+a3​b3​

  • Result: Scalar
  • Measures projection of one vector onto another.

Cross product (vector product)

The cross product of two vectors produces a vector perpendicular to both. Its magnitude depends on the angle θ between the vectors:

A×B=∣A∣∣B∣sinθ n^

Where n^ is the unit vector perpendicular to both A and B.

Using a determinant form:

A×B=​i^a1​b1​​j^​a2​b2​​k^a3​b3​​​

  • Result: Vector
  • Direction follows the right-hand rule.

Watch out: Cross products are anti-commutative - A×B=−B×A - so swapping the order of the two vectors (or the row order in the determinant form) flips the sign of your answer. Use the right-hand rule to check direction: point your fingers along A and curl them toward B; your thumb then points along A×B. The same sign sensitivity carries over to curl, since curl is a cross product of ∇ with F.

Angle between two vectors

You can find the angle between two nonzero vectors using the dot product:

cosθ=∣A∣∣B∣A⋅B​

Gradient, divergence, and curl

Gradient (∇f)

The gradient takes a scalar field f(x,y,z) and produces a vector field. The gradient points in the direction where f increases most rapidly.

∇f=∂x∂f​i^+∂y∂f​j^​+∂z∂f​k^

Divergence (∇· F)

The divergence takes a vector field F=Fx​i^+Fy​j^​+Fz​k^ and produces a scalar field:

∇⋅F=∂x∂Fx​​+∂y∂Fy​​+∂z∂Fz​​

  • Measures the “outflowing-ness” of a vector field at a point.

Curl (∇× F)

The curl takes a vector field F=Fx​i^+Fy​j^​+Fz​k^ and produces another vector field:

∇×F=​i^∂x∂​Fx​​j^​∂y∂​Fy​​k^∂z∂​Fz​​​

  • Measures the rotation or swirling strength of the field.

Identities

Vector algebra identities

Vector dot product properties

  1. Unit vector dot products:

    i⋅i=j⋅j=k⋅k=1

  2. Perpendicular unit vectors:

    i⋅j=j⋅k=k⋅i=0

Vector cross product properties

  1. Unit vector cross products:

    i×i=j×j=k×k=0

  2. Cyclic permutation:

    i×j=k,j×k=i,k×i=j

Vector calculus identities

  1. Laplacian operator:

    ∇2ϕ=∇⋅(∇ϕ)=(∇⋅∇)ϕ

  2. Curl of a gradient:

    ∇×∇ϕ=0

  3. Divergence of a curl:

    ∇⋅(∇×A)=0

Newton’s method for root extraction

Newton’s method (also called the Newton-Raphson method) is an iterative numerical technique for finding roots of a real-valued function f(x) (that is, values of x where f(x)=0).

The iteration formula is:

xn+1​=xn​−f′(xn​)f(xn​)​

  1. Choose an initial guess x0​
  2. Compute successive approximations using the formula
  3. Stop when the difference ∣xn+1​−xn​∣ is below a chosen tolerance

Watch out: Carry at least four to five decimal places through each iteration (and through each subinterval calculation in the trapezoidal or Simpson’s rule below), rounding only your final answer. Rounding too early compounds error across steps and can shift you to a different exam answer choice.

Example: approximating 2​ with Newton’s method

Find the positive root of f(x)=x2−2 (whose root is 2​), starting from x0​=1.5.

Since f′(x)=2x, the iteration formula is:

xn+1​=xn​−2xn​xn2​−2​

Iteration 1:

x1​=1.5−2(1.5)1.52−2​=1.5−30.25​=1.41667

Iteration 2:

x2​=1.41667−2(1.41667)1.416672−2​=1.41422

Answer: After two iterations, x2​≈1.41422, within 0.0001 of 2​=1.41421...

Trapezoidal rule for numerical integration

The trapezoidal rule estimates a definite integral by approximating the graph of f(x) with straight-line segments, forming trapezoids.

Single application

For f(x) over [a,b]:

∫ab​f(x)dx≈2b−a​[f(a)+f(b)]

This is just the composite trapezoidal rule with n=1 - a single trapezoid spanning the whole interval.

Composite trapezoidal rule

Divide the interval into n equal subintervals of width h=nb−a​, then:

∫ab​f(x)dx≈2h​[f(x0​)+2i=1∑n−1​f(xi​)+f(xn​)]

Example: composite trapezoidal rule

Estimate ∫04​x2dx using the composite trapezoidal rule with n=4 subintervals (h=1).

The function values at x0​=0,x1​=1,x2​=2,x3​=3,x4​=4 are f(x0​)=0, f(x1​)=1, f(x2​)=4, f(x3​)=9, f(x4​)=16.

∫04​x2dx≈21​[0+2(1+4+9)+16]=21​(0+28+16)=22

Answer: 22 (the exact value is 364​≈21.33; the trapezoidal estimate overshoots slightly here because x2 is concave up).

Simpson’s rule for numerical integration

Simpson’s rule estimates a definite integral by fitting parabolas through points on the curve.

Single application

For f(x) over [a,b], with midpoint m=2a+b​:

∫ab​f(x)dx≈6b−a​[f(a)+4f(m)+f(b)]

This is just the composite Simpson’s rule with n=2 - a single parabola fit across the whole interval, using the midpoint as the second node.

Composite Simpson’s rule

Let n be even and h=nb−a​:

∫ab​f(x)dx≈3h​[f(x0​)+4i=1,3,5,…∑n−1​f(xi​)+2i=2,4,6,…∑n−2​f(xi​)+f(xn​)]

Example: composite Simpson’s rule

Estimate ∫04​x2dx using composite Simpson’s rule with n=4 subintervals (h=1).

The function values at x0​=0,x1​=1,x2​=2,x3​=3,x4​=4 are f(x0​)=0, f(x1​)=1, f(x2​)=4, f(x3​)=9, f(x4​)=16. The odd-indexed nodes (x1​,x3​) get weight 4, and the even interior node (x2​) gets weight 2:

∫04​x2dx≈31​[0+4(1+9)+2(4)+16]=31​(0+40+8+16)=364​≈21.33

Answer: 21.33 (this matches the exact value of 364​ - Simpson’s rule is exact for polynomials up to degree 3, which is why it outperforms the trapezoidal estimate of 22 from the earlier example).

Matrices and their operations

  • Matrix: rectangular array, m×n dimensions
  • Addition/subtraction: element-wise, same dimensions required
  • Multiplication: row-by-column dot product, defined if columns of A = rows of B
  • Determinant: defined for square matrices, used for invertibility
    • 2×2: ad−bc
    • 3×3: expansion by minors
  • Adjoint: transpose of cofactor matrix, adj(A)=Cof(A)T
  • Inverse: A−1=det(A)1​adj(A), exists if det(A)=0
  • Identity matrix: diagonal of ones, AI=IA=A
  • Properties: associative, distributive, commutative (addition), transpose of product, inverse property

Vectors

  • Vector: has magnitude and direction, written as A=a1​i^+a2​j^​+a3​k^
  • Addition/subtraction: add/subtract components in each direction
  • Dot product: scalar, A⋅B=∣A∣∣B∣cosθ=a1​b1​+a2​b2​+a3​b3​
  • Cross product: vector, A×B=∣A∣∣B∣sinθ n^, determinant form, right-hand rule
  • Angle between vectors: cosθ=∣A∣∣B∣A⋅B​
  • Projection:
    • Scalar: ∣B∣A⋅B​
    • Vector: (∣B∣2A⋅B​)B

Gradient, divergence, and curl

  • Gradient (∇f): vector field from scalar field, points in direction of greatest increase
    • ∇f=∂x∂f​i^+∂y∂f​j^​+∂z∂f​k^
  • Divergence (∇⋅F): scalar from vector field, measures outflowing-ness
    • ∇⋅F=∂x∂Fx​​+∂y∂Fy​​+∂z∂Fz​​
  • Curl (∇×F): vector from vector field, measures rotation
    • Determinant form with partial derivatives and components

Identities

  • Vector dot product:
    • Commutative: A⋅B=B⋅A
    • Distributive: A⋅(B+C)=A⋅B+A⋅C
    • A⋅A=∣A∣2
    • Unit vectors: i⋅i=1, i⋅j=0
    • Zero dot product: vectors are perpendicular or one is zero
  • Vector cross product:
    • Anti-commutative: A×B=−B×A
    • Distributive: A×(B+C)=(A×B)+(A×C)
    • Unit vectors: i×j=k, cyclic permutations
    • Zero cross product: vectors are parallel or one is zero
  • Vector calculus:
    • Laplacian: ∇2ϕ=∇⋅(∇ϕ)
    • Curl of gradient: ∇×∇ϕ=0
    • Divergence of curl: ∇⋅(∇×A)=0
    • Vector Laplacian: ∇×(∇×A)=∇(∇⋅A)−∇2A

Newton’s method for root extraction

  • Iterative method for solving f(x)=0
  • Formula: xn+1​=xn​−f′(xn​)f(xn​)​
  • Steps:
    • Choose initial guess x0​
    • Repeat iteration until ∣xn+1​−xn​∣ is small

Trapezoidal rule for numerical integration

  • Approximates ∫ab​f(x)dx using trapezoids
  • Single: 2b−a​[f(a)+f(b)]
  • Composite: 2h​[f(x0​)+2∑i=1n−1​f(xi​)+f(xn​)], h=nb−a​

Simpson’s rule for numerical integration

  • Approximates ∫ab​f(x)dx using parabolas
  • Single: 6b−a​[f(a)+4f(m)+f(b)], m=2a+b​
  • Composite: 3h​[f(x0​)+4∑i=1,3,…n−1​f(xi​)+2∑i=2,4,…n−2​f(xi​)+f(xn​)], n even, h=nb−a​

Sign up for free to take 7 quiz questions on this topic

Previous
Next  | 2.1 Combinatorics and probability
All rights reserved ©2016 - 2026 Achievable, Inc.

Matrices and Vectors

This chapter covers the following topics:

  • Matrices and their operations
  • Vectors
  • Gradient, divergence, and curl
  • Identities
  • Newton’s method for root extraction
  • Trapezoidal rule for numerical integration
  • Simpson’s rule for numerical integration

Most of the formulas in this chapter - the determinant, matrix inverse, dot/cross product, and Newton’s-method formulas among them - appear in the mathematics section of the NCEES FE Reference Handbook, which is provided during the exam. Since you’ll have it open, focus on knowing where to find each formula rather than memorizing it.

Matrices and their operations

A matrix is a rectangular array of numbers arranged in rows and columns. We usually write an m×n matrix (with m rows and n columns) as:

A=​a11​a21​⋮am1​​a12​a22​⋮am2​​……⋱…​a1n​a2n​⋮amn​​​

Addition and subtraction

You can add or subtract two matrices only if they have the same dimensions. The operation is done element by element:

C=A±B=​a11​±b11​a21​±b21​⋮am1​±bm1​​a12​±b12​a22​±b22​⋮am2​±bm2​​……⋱…​a1n​±b1n​a2n​±b2n​⋮amn​±bmn​​​

Matrix multiplication

Matrix multiplication is not done element by element. Instead, each entry of the product comes from a row-by-column dot product.

C=AB

If A is an m×p matrix and B is a p×n matrix, then C is an m×n matrix, and each entry is

cij​=k=1∑p​aik​bkj​

Matrix multiplication is defined only when the number of columns of A matches the number of rows of B.

Example: multiplying two 2×2 matrices

Find AB for A=[13​24​] and B=[57​68​].

Each entry of AB comes from a row-by-column dot product:

AB=[(1)(5)+(2)(7)(3)(5)+(4)(7)​(1)(6)+(2)(8)(3)(6)+(4)(8)​]=[1943​2250​]

Answer: AB=[1943​2250​]

Determinant of a matrix

The determinant is defined for square matrices. It produces a single number that is used in several places, including checking whether a matrix is invertible.

For a 2×2 matrix:

det(A)=​ac​bd​​=ad−bc

For a 3×3 matrix:

det(A)=​a11​a21​a31​​a12​a22​a32​​a13​a23​a33​​​=a11​​a22​a32​​a23​a33​​​−a12​​a21​a31​​a23​a33​​​+a13​​a21​a31​​a22​a32​​​

Inverse of a matrix

A square matrix A has an inverse only if its determinant is nonzero (that is, det(A)=0). For a 2×2 matrix A=[ac​bd​], the inverse is found by swapping the diagonal entries, negating the off-diagonal entries, and dividing by the determinant:

A−1=ad−bc1​[d−c​−ba​]

Example: inverting a 2×2 matrix

Find A−1 for A=[42​31​].

First, compute the determinant: det(A)=(4)(1)−(3)(2)=4−6=−2.

Since det(A)=0, the inverse exists:

A−1=−21​[1−2​−34​]=[−0.51​1.5−2​]

Answer: A−1=[−0.51​1.5−2​]

Identity matrix

An identity matrix is a square matrix with ones on the diagonal and zeros everywhere else:

In​=​10⋮0​01⋮0​……⋱…​00⋮1​​

It acts like the number 1 in matrix multiplication:

AI=IA=A

Properties of matrices

  1. Associative property: (AB)C=A(BC)
  2. Distributive property: A(B+C)=AB+AC
  3. Commutative property (addition): A+B=B+A
  4. Transpose of a product: (AB)T=BTAT
  5. Inverse property: AA−1=A−1A=I

This section has outlined the main matrix operations and the key definitions used with square matrices.

Vectors

A vector is a quantity that has both magnitude and direction. In three dimensions, a vector is often written in component form as:

A=a1​i^+a2​j^​+a3​k^

Where:

  • a1​,a2​,a3​ are the components of the vector in the x, y, and z directions.
  • i^,j^​,k^ are unit vectors in the x, y, and z directions, respectively.

Vector addition and subtraction

Addition

Vector addition combines components in the same direction:

A+B=(a1​+b1​)i^+(a2​+b2​)j^​+(a3​+b3​)k^

Subtraction

Vector subtraction subtracts components in the same direction:

A−B=(a1​−b1​)i^+(a2​−b2​)j^​+(a3​−b3​)k^

Example: magnitude of a resultant vector

Two vectors are given by A=3i^ and B=4j^​. Find the magnitude of the resultant vector R=A+B.

R=A+B=3i^+4j^​

The magnitude of a vector V=v1​i^+v2​j^​+v3​k^ is ∣V∣=v12​+v22​+v32​​, so:

∣R∣=32+42​=9+16​=25​=5

Answer: ∣R∣=5

Dot product (scalar product)

The dot product of two vectors produces a scalar. It can be defined using magnitudes and the angle θ between the vectors:

A⋅B=∣A∣∣B∣cosθ

Or computed directly from components:

A⋅B=a1​b1​+a2​b2​+a3​b3​

  • Result: Scalar
  • Measures projection of one vector onto another.

Cross product (vector product)

The cross product of two vectors produces a vector perpendicular to both. Its magnitude depends on the angle θ between the vectors:

A×B=∣A∣∣B∣sinθ n^

Where n^ is the unit vector perpendicular to both A and B.

Using a determinant form:

A×B=​i^a1​b1​​j^​a2​b2​​k^a3​b3​​​

  • Result: Vector
  • Direction follows the right-hand rule.

Watch out: Cross products are anti-commutative - A×B=−B×A - so swapping the order of the two vectors (or the row order in the determinant form) flips the sign of your answer. Use the right-hand rule to check direction: point your fingers along A and curl them toward B; your thumb then points along A×B. The same sign sensitivity carries over to curl, since curl is a cross product of ∇ with F.

Angle between two vectors

You can find the angle between two nonzero vectors using the dot product:

cosθ=∣A∣∣B∣A⋅B​

Gradient, divergence, and curl

Gradient (∇f)

The gradient takes a scalar field f(x,y,z) and produces a vector field. The gradient points in the direction where f increases most rapidly.

∇f=∂x∂f​i^+∂y∂f​j^​+∂z∂f​k^

Divergence (∇· F)

The divergence takes a vector field F=Fx​i^+Fy​j^​+Fz​k^ and produces a scalar field:

∇⋅F=∂x∂Fx​​+∂y∂Fy​​+∂z∂Fz​​

  • Measures the “outflowing-ness” of a vector field at a point.

Curl (∇× F)

The curl takes a vector field F=Fx​i^+Fy​j^​+Fz​k^ and produces another vector field:

∇×F=​i^∂x∂​Fx​​j^​∂y∂​Fy​​k^∂z∂​Fz​​​

  • Measures the rotation or swirling strength of the field.

Identities

Vector algebra identities

Vector dot product properties

  1. Unit vector dot products:

    i⋅i=j⋅j=k⋅k=1

  2. Perpendicular unit vectors:

    i⋅j=j⋅k=k⋅i=0

Vector cross product properties

  1. Unit vector cross products:

    i×i=j×j=k×k=0

  2. Cyclic permutation:

    i×j=k,j×k=i,k×i=j

Vector calculus identities

  1. Laplacian operator:

    ∇2ϕ=∇⋅(∇ϕ)=(∇⋅∇)ϕ

  2. Curl of a gradient:

    ∇×∇ϕ=0

  3. Divergence of a curl:

    ∇⋅(∇×A)=0

Newton’s method for root extraction

Newton’s method (also called the Newton-Raphson method) is an iterative numerical technique for finding roots of a real-valued function f(x) (that is, values of x where f(x)=0).

The iteration formula is:

xn+1​=xn​−f′(xn​)f(xn​)​

  1. Choose an initial guess x0​
  2. Compute successive approximations using the formula
  3. Stop when the difference ∣xn+1​−xn​∣ is below a chosen tolerance

Watch out: Carry at least four to five decimal places through each iteration (and through each subinterval calculation in the trapezoidal or Simpson’s rule below), rounding only your final answer. Rounding too early compounds error across steps and can shift you to a different exam answer choice.

Example: approximating 2​ with Newton’s method

Find the positive root of f(x)=x2−2 (whose root is 2​), starting from x0​=1.5.

Since f′(x)=2x, the iteration formula is:

xn+1​=xn​−2xn​xn2​−2​

Iteration 1:

x1​=1.5−2(1.5)1.52−2​=1.5−30.25​=1.41667

Iteration 2:

x2​=1.41667−2(1.41667)1.416672−2​=1.41422

Answer: After two iterations, x2​≈1.41422, within 0.0001 of 2​=1.41421...

Trapezoidal rule for numerical integration

The trapezoidal rule estimates a definite integral by approximating the graph of f(x) with straight-line segments, forming trapezoids.

Single application

For f(x) over [a,b]:

∫ab​f(x)dx≈2b−a​[f(a)+f(b)]

This is just the composite trapezoidal rule with n=1 - a single trapezoid spanning the whole interval.

Composite trapezoidal rule

Divide the interval into n equal subintervals of width h=nb−a​, then:

∫ab​f(x)dx≈2h​[f(x0​)+2i=1∑n−1​f(xi​)+f(xn​)]

Example: composite trapezoidal rule

Estimate ∫04​x2dx using the composite trapezoidal rule with n=4 subintervals (h=1).

The function values at x0​=0,x1​=1,x2​=2,x3​=3,x4​=4 are f(x0​)=0, f(x1​)=1, f(x2​)=4, f(x3​)=9, f(x4​)=16.

∫04​x2dx≈21​[0+2(1+4+9)+16]=21​(0+28+16)=22

Answer: 22 (the exact value is 364​≈21.33; the trapezoidal estimate overshoots slightly here because x2 is concave up).

Simpson’s rule for numerical integration

Simpson’s rule estimates a definite integral by fitting parabolas through points on the curve.

Single application

For f(x) over [a,b], with midpoint m=2a+b​:

∫ab​f(x)dx≈6b−a​[f(a)+4f(m)+f(b)]

This is just the composite Simpson’s rule with n=2 - a single parabola fit across the whole interval, using the midpoint as the second node.

Composite Simpson’s rule

Let n be even and h=nb−a​:

∫ab​f(x)dx≈3h​[f(x0​)+4i=1,3,5,…∑n−1​f(xi​)+2i=2,4,6,…∑n−2​f(xi​)+f(xn​)]

Example: composite Simpson’s rule

Estimate ∫04​x2dx using composite Simpson’s rule with n=4 subintervals (h=1).

The function values at x0​=0,x1​=1,x2​=2,x3​=3,x4​=4 are f(x0​)=0, f(x1​)=1, f(x2​)=4, f(x3​)=9, f(x4​)=16. The odd-indexed nodes (x1​,x3​) get weight 4, and the even interior node (x2​) gets weight 2:

∫04​x2dx≈31​[0+4(1+9)+2(4)+16]=31​(0+40+8+16)=364​≈21.33

Answer: 21.33 (this matches the exact value of 364​ - Simpson’s rule is exact for polynomials up to degree 3, which is why it outperforms the trapezoidal estimate of 22 from the earlier example).

Key points

Matrices and their operations

  • Matrix: rectangular array, m×n dimensions
  • Addition/subtraction: element-wise, same dimensions required
  • Multiplication: row-by-column dot product, defined if columns of A = rows of B
  • Determinant: defined for square matrices, used for invertibility
    • 2×2: ad−bc
    • 3×3: expansion by minors
  • Adjoint: transpose of cofactor matrix, adj(A)=Cof(A)T
  • Inverse: A−1=det(A)1​adj(A), exists if det(A)=0
  • Identity matrix: diagonal of ones, AI=IA=A
  • Properties: associative, distributive, commutative (addition), transpose of product, inverse property

Vectors

  • Vector: has magnitude and direction, written as A=a1​i^+a2​j^​+a3​k^
  • Addition/subtraction: add/subtract components in each direction
  • Dot product: scalar, A⋅B=∣A∣∣B∣cosθ=a1​b1​+a2​b2​+a3​b3​
  • Cross product: vector, A×B=∣A∣∣B∣sinθ n^, determinant form, right-hand rule
  • Angle between vectors: cosθ=∣A∣∣B∣A⋅B​
  • Projection:
    • Scalar: ∣B∣A⋅B​
    • Vector: (∣B∣2A⋅B​)B

Gradient, divergence, and curl

  • Gradient (∇f): vector field from scalar field, points in direction of greatest increase
    • ∇f=∂x∂f​i^+∂y∂f​j^​+∂z∂f​k^
  • Divergence (∇⋅F): scalar from vector field, measures outflowing-ness
    • ∇⋅F=∂x∂Fx​​+∂y∂Fy​​+∂z∂Fz​​
  • Curl (∇×F): vector from vector field, measures rotation
    • Determinant form with partial derivatives and components

Identities

  • Vector dot product:
    • Commutative: A⋅B=B⋅A
    • Distributive: A⋅(B+C)=A⋅B+A⋅C
    • A⋅A=∣A∣2
    • Unit vectors: i⋅i=1, i⋅j=0
    • Zero dot product: vectors are perpendicular or one is zero
  • Vector cross product:
    • Anti-commutative: A×B=−B×A
    • Distributive: A×(B+C)=(A×B)+(A×C)
    • Unit vectors: i×j=k, cyclic permutations
    • Zero cross product: vectors are parallel or one is zero
  • Vector calculus:
    • Laplacian: ∇2ϕ=∇⋅(∇ϕ)
    • Curl of gradient: ∇×∇ϕ=0
    • Divergence of curl: ∇⋅(∇×A)=0
    • Vector Laplacian: ∇×(∇×A)=∇(∇⋅A)−∇2A

Newton’s method for root extraction

  • Iterative method for solving f(x)=0
  • Formula: xn+1​=xn​−f′(xn​)f(xn​)​
  • Steps:
    • Choose initial guess x0​
    • Repeat iteration until ∣xn+1​−xn​∣ is small

Trapezoidal rule for numerical integration

  • Approximates ∫ab​f(x)dx using trapezoids
  • Single: 2b−a​[f(a)+f(b)]
  • Composite: 2h​[f(x0​)+2∑i=1n−1​f(xi​)+f(xn​)], h=nb−a​

Simpson’s rule for numerical integration

  • Approximates ∫ab​f(x)dx using parabolas
  • Single: 6b−a​[f(a)+4f(m)+f(b)], m=2a+b​
  • Composite: 3h​[f(x0​)+4∑i=1,3,…n−1​f(xi​)+2∑i=2,4,…n−2​f(xi​)+f(xn​)], n even, h=nb−a​

More from Mathematics

  • Coordinate geometry
  • Geometric feature and trigonometry
  • Algebra
  • Calculus