Basic Mathematics for IT

Chapter 2
Algebra, Equations and Inequalities

Bachelors Program in IT
Basic Mathematics for IT   •   Bachelor

Algebra, Equations and Inequalities

Introduction

Algebra provides a language for describing quantities, relationships, constraints and change. In information technology, algebra is used in programming expressions, database queries, algorithm analysis, computer graphics, cybersecurity, networking, finance and performance modelling. A variable can represent memory usage, processing time, data volume, price or a parameter in a machine-learning model. The ability to manipulate algebraic expressions and solve equations therefore supports both technical implementation and professional decision-making.

This chapter develops the foundations needed to simplify expressions, work with exponents and logarithms, factor and evaluate polynomials, solve equations and systems, and interpret inequalities. Emphasis is placed on valid transformations, assumptions and practical applications.

Learning objectives

By the end of this chapter, you should be able to:

  • distinguish variables, constants, coefficients, terms and algebraic expressions;
  • simplify expressions using the laws of arithmetic and algebra;
  • apply exponent and logarithm laws, including their domain restrictions;
  • expand, factor and evaluate polynomials;
  • solve linear, quadratic, exponential and logarithmic equations;
  • solve simultaneous linear equations and interpret their solutions;
  • solve and represent linear and polynomial inequalities;
  • model computing, finance and performance problems algebraically;
  • identify common errors and assess whether an algebraic result is reasonable.

1. Algebraic language and expressions

A variable is a symbol representing a quantity that may change. A constant has a fixed value in a particular problem. In 7x2 - 3x + 5, the terms are 7x2, -3x and 5. The coefficients are 7 and −3; 5 is a constant term. The degree of a polynomial is the greatest exponent of its variable, so this polynomial has degree 2.

An expression has no equality sign, whereas an equation asserts that two expressions have equal values. For example, 3x + 2 is an expression and 3x + 2 = 14 is an equation. A function assigns an output to an input. The notation f(x) = 3x + 2 means that the value of the function at input x is 3x + 2.

Like terms and the distributive law

Like terms have identical variable parts. Thus, 4x and -9x are like terms, but x and x2 are not. Like terms may be combined by adding their coefficients:

4x - 9x = -5x

The distributive law is

a(b + c) = ab + ac

where a, b and c are numbers or algebraic expressions. It also gives a(b - c) = ab - ac.

Worked example 1: simplifying an expression

Simplify 3(2x - 5) + 4x + 7. Distribute 3, then collect like terms:

3(2x - 5) + 4x + 7 = 6x - 15 + 4x + 7 = 10x - 8.

The result is valid for every real value of x.

Substitution evaluates an expression for specified variable values. If x = 3 and y = -2, then

2x2 - 3y = 2(3)2 - 3(-2) = 18 + 6 = 24.

Parentheses are essential when substituting a negative number.

2. Exponents and radicals

For a nonzero base a and integers m and n, the exponent laws include:

am an = a^(m+n)
am ÷ an = a^(m-n)
(am)n = a^(mn)
(ab)n = an bn

Also, a0 = 1 for a ≠ 0, and a-n = 1/an. A fractional exponent is related to a root: a1/n = √[n]{a}, where the real-valued interpretation requires a ≥ 0 when n is even.

These rules do not permit addition of exponents across sums. In general, am + an ≠ am+n.

Worked example 2: exponent simplification

For x ≠ 0, simplify (2x3)2 ÷ 4x. First expand the power:

(2x3)2 = 4x6. Therefore,

4x6 ÷ 4x = x5.

The restriction x ≠ 0 is required because the original expression divides by x.

Scientific notation represents very large or small numbers as a × 10n, where 1 ≤ |a| < 10 and n is an integer. For example, 3,200,000 is 3.2 × 106. In computing, powers of 2 are common: 210 = 1024, so 8 KiB conventionally represents 8192 bytes when using binary units.

3. Logarithms

A logarithm is the inverse of exponentiation. For b > 0, b ≠ 1 and x > 0,

logb(x) = y ⇔ by = x

The base-10 logarithm is written log(x) in many contexts, and the natural logarithm has base e ≈ 2.71828 and is written ln(x).

Important laws, for positive u and v, are:

logb(uv) = logb(u) + logb(v)
logb(u/v) = logb(u) - logb(v)
logb(ur) = r logb(u)

The change-of-base formula is

logb(x) = ln(x) / ln(b)

The arguments of logarithms must be positive. Consequently, log(x - 3) requires x > 3. Logarithms are important in algorithm analysis because repeatedly halving a problem produces logarithmic behaviour. They also occur in decibels, information theory and financial growth models.

Worked example 3: solving a logarithmic equation

Solve log2(x - 1) = 3. Convert to exponential form:

x - 1 = 23 = 8, so x = 9. The domain condition x - 1 > 0 gives x > 1, and 9 satisfies it.

4. Polynomials and factoring

A polynomial in x has the form

p(x) = an xn + a_(n-1) x^(n-1) + … + a1 x + a0

where the coefficients ai are constants and n is a non-negative integer. A polynomial is in standard form when terms are arranged in descending powers.

Multiplication uses the distributive law. Two important identities are:

(a + b)2 = a2 + 2ab + b2
a2 - b2 = (a - b)(a + b)

Factoring reverses expansion. For example,

x2 + 5x + 6 = (x + 2)(x + 3).

The zero-product property states that if uv = 0, then u = 0 or v = 0. It applies over the real numbers and leads directly to solutions of factored polynomial equations.

Worked example 4: factoring a quadratic

Solve x2 - 7x + 12 = 0. We seek two numbers whose product is 12 and sum is −7: −3 and −4. Thus,

(x - 3)(x - 4) = 0.

Therefore x = 3 or x = 4. Substitution into the original equation verifies both solutions.

For a quadratic equation

ax2 + bx + c = 0, a ≠ 0

the quadratic formula is

x = (-b ± √(b2 - 4ac)) / (2a)

The discriminant Δ = b2 - 4ac determines the real roots: Δ > 0 gives two distinct real roots, Δ = 0 gives one repeated real root, and Δ < 0 gives no real roots. Complex roots may still exist when Δ < 0.

5. Equations and valid transformations

Solving an equation means finding values that make it true. The equality-preserving operations are adding or subtracting the same quantity on both sides and multiplying or dividing both sides by the same nonzero quantity. Multiplication by zero is not reversible and division by zero is undefined.

Linear equations

A linear equation in one variable can be written ax + b = c, where a ≠ 0. Its solution is

x = (c - b) / a

Worked example 5: a resource equation

A cloud service charges a fixed monthly fee of 18 monetary units plus 0.04 units per gigabyte transferred. If the bill is 74 units, the data volume g satisfies

18 + 0.04g = 74.

Subtract 18: 0.04g = 56. Divide by 0.04: g = 1400 gigabytes. The units are consistent because monetary units divided by monetary units per gigabyte produces gigabytes.

Equations involving fractions and radicals

Multiplying by a common denominator can remove fractions, but any excluded values must be recorded. Squaring both sides can introduce extraneous solutions, so every candidate must be checked in the original equation.

For example, solve √(x + 1) = x - 1. The right side must be non-negative, so x ≥ 1. Squaring gives x + 1 = x2 - 2x + 1, hence x(x - 3) = 0. Candidates are 0 and 3; only 3 satisfies the original equation. Thus the solution is x = 3.

6. Systems of linear equations

A system contains equations that must hold simultaneously. For two equations,

a1x + b1y = c1
a2x + b2y = c2

there may be one solution, no solution or infinitely many solutions. Graphically, these correspond respectively to intersecting, parallel or coincident lines.

Substitution solves one equation for a variable and inserts the result into the other. Elimination adds or subtracts suitably multiplied equations to remove a variable.

Worked example 6: system for capacity planning

A development team provisions 20 virtual machines of two types. Type A uses 4 CPU units and Type B uses 7 CPU units. The total available capacity is 116 CPU units. Let a and b be the numbers of each type:

a + b = 20

4a + 7b = 116.

Multiply the first equation by 4: 4a + 4b = 80. Subtract from the second: 3b = 36, so b = 12. Therefore a = 8. Both values are non-negative integers, and checking gives 8 + 12 = 20 and 32 + 84 = 116.

For larger systems, Gaussian elimination organizes equations in a matrix and applies row operations. The same principle of equality-preserving transformation applies.

7. Inequalities and intervals

An inequality compares quantities using <, >, ≤ or ≥. Adding or subtracting the same quantity preserves the inequality direction. Multiplying or dividing by a positive quantity also preserves it; multiplying or dividing by a negative quantity reverses it.

Worked example 7: service-level constraint

Suppose response time is modelled by T = 2 + 0.5n milliseconds, where n is the number of sequential processing stages. To meet a limit of 10 ms:

2 + 0.5n ≤ 10

0.5n ≤ 8

n ≤ 16.

If stages must be whole and non-negative, the feasible values are 0 ≤ n ≤ 16. The algebraic result must be interpreted with the context; negative stages are meaningless.

For a product inequality, first find critical points where a factor is zero or undefined, then test the sign in each interval. Solve (x - 2)(x + 1) ≥ 0. Critical points are −1 and 2. The product is positive to the left of −1, negative between −1 and 2, and positive to the right of 2. Because equality is allowed, the solution is x ≤ -1 or x ≥ 2.

Absolute-value inequalities express distance. For d > 0,

|x| < d ⇔ -d < x < d

and

|x| > d ⇔ x < -d or x > d

8. Applications in computing and finance

Algorithmic growth

If an algorithm performs approximately T(n) = 3n2 + 5n + 2 operations, its dominant term for large n is 3n2. In asymptotic analysis, constant factors and lower-order terms are omitted, giving T(n) = O(n2). Algebra helps compare alternatives: a linear algorithm may outperform a quadratic one as data size increases, even if the quadratic implementation is faster for very small inputs.

Binary search repeatedly halves a sorted search space. After k halvings, the remaining size is approximately n/2k. To reduce it to at most one item, require n/2k ≤ 1, so 2k ≥ n and k ≥ log2(n). Thus the number of comparisons grows logarithmically.

Compound growth

If an initial amount P0 grows at rate r per period for t periods, with compounding once per period, the amount is

Pt = P0(1 + r)t

Here r is expressed as a decimal and the rate and time period must match. For continuous growth at rate r, the model is

P(t) = P0 e^(rt)

These are models, not guarantees: real investment returns, costs and demand may vary.

Break-even analysis

If fixed cost is F, variable cost per unit is v, selling price per unit is p, and quantity is q, then

Revenue = pq
Cost = F + vq

Break-even occurs when revenue equals cost. Provided p > v,

q = F / (p - v)

The denominator is the contribution margin per unit. If p ≤ v, increasing sales cannot recover the fixed cost under this model.

9. Detailed applied case: selecting an edge-computing design

Background

This illustrative case concerns a small company deciding whether to process sensor data centrally or at edge devices. Each edge device costs 320 monetary units, while a central architecture has a fixed setup cost of 4,800 units. The edge design also has a recurring cost of 0.06 units per processed record; the central design costs 0.10 units per record.

Problem

For how many records does the edge design become less expensive, ignoring maintenance and discounting?

Analysis

Let n be the number of records. The edge cost is CE = 320d + 0.06n, where d is the number of edge devices. Suppose 12 devices are required:

CE = 320(12) + 0.06n = 3840 + 0.06n.

The central cost is

CC = 4800 + 0.10n.

Set costs equal to find the break-even volume:

3840 + 0.06n = 4800 + 0.10n.

Subtract 3840 and 0.10n:

-0.04n = 960, giving n = -24000.

The negative result indicates that, under these assumptions, the edge design is already cheaper at every non-negative data volume: its fixed cost is lower and its variable cost is lower. The apparent “break-even” lies outside the feasible domain.

Approach and outcome

At n = 0, edge cost is 3840 and central cost is 4800. For every additional record, edge cost increases by 0.06 while central cost increases by 0.10. Therefore the difference CC - CE = 960 + 0.04n is positive for all n ≥ 0.

Learning points

First, algebra can reveal that a requested threshold does not exist in the practical domain. Second, domain restrictions are essential: record counts cannot be negative. Third, a cost model is only as reliable as its assumptions. Energy, hardware replacement, latency, privacy, reliability and regulatory requirements may change the decision.

10. Errors, limitations and professional practice

Common errors include combining unlike terms, misusing exponent laws, forgetting logarithm domains, reversing an inequality incorrectly, losing a negative sign, and accepting a value introduced by squaring. A robust workflow is:

  1. define variables and units;
  2. state domain restrictions;
  3. write the model before manipulating it;
  4. apply one justified transformation at a time;
  5. check the result in the original equation or inequality;
  6. assess feasibility and magnitude;
  7. communicate assumptions and uncertainty.

Computer algebra systems and spreadsheets can expand, factor and solve expressions, but they do not automatically understand business meaning. A symbolic solver may return complex values when only real values are relevant, or produce a mathematically valid result that violates a capacity or privacy constraint. AI-assisted tools should therefore be used for exploration and verification, not as substitutes for domain definitions, independent checks or professional accountability.

In software, algebraic transformations can also affect safety. Simplifying a formula that contains division requires attention to zero denominators; rounding monetary values requires a stated policy; and performance models should not be presented as measurements unless they have been validated against observed data.

Chapter Summary

Algebra represents quantities and relationships using variables, constants, coefficients and expressions. The distributive law and collection of like terms simplify expressions, while exponent laws support manipulation of powers, roots and scientific notation. Logarithms reverse exponentiation and are subject to positive-argument restrictions.

Polynomials can be expanded, factored and solved using the zero-product property or the quadratic formula. Equations are solved through equality-preserving operations, with substitution checks required after operations such as squaring. Systems of equations model simultaneous constraints and can be solved by substitution or elimination. Inequalities require special care when multiplying or dividing by negative quantities, and their solutions must be interpreted as intervals or feasible sets.

These methods support algorithm analysis, capacity planning, compound growth, break-even analysis and technology design. Reliable algebraic work combines correct manipulation with domain restrictions, units, validation and awareness of model limitations.

Key Terms

Variable: A symbol representing a quantity that may change.

Constant: A fixed quantity in a particular context.

Coefficient: A numerical factor multiplying a variable or term.

Term: A component of an expression separated by addition or subtraction.

Expression: A mathematical combination of numbers, variables and operations without an equality claim.

A statement that two expressions are equal.

Function: A rule assigning an output to each permitted input.

Exponent: A number indicating repeated multiplication or a generalized power.

Logarithm: The inverse operation of exponentiation.

Polynomial: An expression formed from non-negative integer powers of a variable and constant coefficients.

Factor: A quantity multiplied by another quantity to produce a product.

Root: A value that makes an equation or function equal to zero.

Discriminant: The quantity b2 - 4ac in a quadratic equation.

System of equations: Two or more equations that must hold simultaneously.

Inequality: A comparison using symbols such as < or ≥.

Domain: The set of permitted input values.

Break-even point: The quantity at which revenue equals cost.

Asymptotic notation: A description of growth rate for large input sizes.

Extraneous solution: A candidate produced during manipulation that does not satisfy the original equation.

Review Questions

5 Short Answer Questions

  1. What is the difference between an expression and an equation?
  2. State two laws of exponents and the conditions under which division of powers is valid.
  3. Why must the argument of a real logarithm be positive?
  4. What happens to an inequality when both sides are multiplied by a negative number?
  5. What does the discriminant indicate about the real roots of a quadratic equation?

5 Long Answer Questions

  1. Explain the distributive law, collection of like terms and substitution, and illustrate each with an example.
  2. Describe two methods for solving a system of linear equations and discuss the meaning of one, none or infinitely many solutions.
  3. Derive the break-even quantity from linear revenue and cost models, defining every variable and stating the required assumption.
  4. Explain how logarithms arise in binary-search performance analysis.
  5. Discuss why domain restrictions and checking in the original equation are essential when solving radical or rational equations.

3 Analytical / Application Questions

  1. A service has a fixed cost of 2,500 units, a variable cost of 0.18 units per transaction and a price of 0.43 units per transaction. Formulate the break-even equation and calculate the break-even number of transactions.
  2. Solve (x - 5)(2x + 3) < 0 and explain how the critical points determine the interval solution.
  3. A storage system has capacity 64 TB and currently stores 18 TB. Each month, stored data increases by 2.5 TB. Formulate and solve an inequality for the number of complete months before capacity is exceeded. State any assumptions.

Multiple Choice Questions with Answers

Question 1

Simplify 3(2x - 4) + x.

A. 7x - 12

B. 7x - 4

C. 6x - 12

D. 5x - 12

Correct Answer: A. 7x - 12

Question 2

For a ≠ 0, which expression equals a3 a5?

A. a2

B. a8

C. a15

D. 2a8

Correct Answer: B. a8

Question 3

Solve log2(x) = 4.

A. x = 2

B. x = 8

C. x = 16

D. x = 32

Correct Answer: C. x = 16

Question 4

What are the solutions of x2 - 5x + 6 = 0?

A. x = -2, -3

B. x = 2, 3

C. x = 1, 6

D. x = -1, 6

Correct Answer: B. x = 2, 3

Question 5

What is the solution of 4x + 3 = 19?

A. x = 3

B. x = 4

C. x = 5

D. x = 6

Correct Answer: B. x = 4

Question 6

In the system x + y = 10 and x - y = 2, what is x?

A. 4

B. 5

C. 6

D. 8

Correct Answer: C. 6

Question 7

What is the solution of −2x > 8?

A. x > -4

B. x < -4

C. x > 4

D. x < 4

Correct Answer: B. x < -4

Question 8

If T(n) = 2 + 0.5n and T(n) ≤ 10, which condition must hold?

A. n ≤ 8

B. n ≤ 16

C. n ≥ 16

D. n = 20

Correct Answer: B. n ≤ 16

Question 9

A cost model has fixed cost 1000, variable cost 2 per unit and price 7 per unit. What is the break-even quantity?

A. 100

B. 150

C. 200

D. 500

Correct Answer: C. 200

Question 10

Which condition is required for logb(x) to be a real logarithm?

A. x = 0

B. x < 0

C. x > 0

D. b = 1

Correct Answer: C. x > 0

Basic Mathematics for IT
Chapter 2 of 15