Contents
  1. The short answer
  2. The core formulas
  3. Matrix form and homogeneous coordinates
  4. Types of scaling
  5. A classic scaling program in C
  6. A modern, library-independent version
  7. How this applies to vector logo files
  8. Evidence gaps

The short answer

A scaling program in computer graphics changes the size of an object by multiplying the coordinates of its points by scale factors. Each x coordinate is multiplied by a horizontal factor (Sx) and each y coordinate by a vertical factor (Sy). Factors greater than 1 enlarge the object, factors between 0 and 1 shrink it, and a factor of exactly 1 leaves that axis unchanged. When Sx and Sy are equal, the scaling is uniform and the object keeps its proportions. When they differ, the object is stretched or squashed.

This is the same operation that happens when a vector logo is resized with the aspect ratio locked. The logo is stored as points, curves and shapes, so resizing transforms those coordinates rather than enlarging pixels. That is why proportional scaling of true vector artwork keeps edges sharp at any output size.

The core formulas

For a point (x, y), scaling relative to the origin produces a new point (x', y'):

x' = x * Sx
y' = y * Sy

Scaling about the origin has a side effect that beginners often notice in their first program: the shape not only changes size but also moves, because every point's distance from the origin is multiplied too. To resize an object in place, scale it about a fixed point (xf, yf), such as its center or one corner:

x' = xf + (x - xf) * Sx
y' = yf + (y - yf) * Sy

Matrix form and homogeneous coordinates

Graphics systems usually express scaling as a matrix so it can be combined with translation and rotation. Using homogeneous coordinates, a 2D point is written as (x, y, 1) and multiplied by a 3×3 matrix:

| x' |   | Sx  0   0 |   | x |
| y' | = | 0   Sy  0 | * | y |
| 1  |   | 0   0   1 |   | 1 |

Scaling about a fixed point is a composite transformation: translate the fixed point to the origin, scale, then translate back. Written as matrices, that is T(xf, yf) · S(Sx, Sy) · T(-xf, -yf). The order matters, because matrix multiplication is not commutative, and reversing the steps produces a different result.

Types of scaling

Type | Condition | Effect on a shape | Relevance to logos
Uniform | Sx = Sy | Size changes, proportions preserved | The correct way to resize a logo
Non-uniform (differential) | Sx ≠ Sy | Shape is stretched or compressed along one axis | Distorts letterforms and symbols; generally avoided
Reduction | 0 < S < 1 | Object becomes smaller | Favicons, small placements, print at small sizes
Enlargement | S > 1 | Object becomes larger | Signage, large-format print
Reflection | Negative factor, such as Sx = -1 | Object is mirrored across an axis | Rarely appropriate for a finished mark

A classic scaling program in C

Many computer graphics courses use the BGI graphics library (graphics.h), which comes from the Turbo C era and today usually runs through an emulation package. The program below draws a triangle, then draws a scaled copy. It scales about the origin, so the copy also shifts position, which illustrates the point made above.

#include <stdio.h>
#include <conio.h>
#include <graphics.h>

int main(void)
{
    int gd = DETECT, gm;
    int x1 = 100, y1 = 150, x2 = 200, y2 = 150, x3 = 150, y3 = 100;
    float sx, sy;

    printf("Enter scaling factors sx and sy: ");
    scanf("%f %f", &sx, &sy);

    initgraph(&gd, &gm, "");

    /* original triangle */
    line(x1, y1, x2, y2);
    line(x2, y2, x3, y3);
    line(x3, y3, x1, y1);

    /* scaled triangle (about the origin) */
    line(x1 * sx, y1 * sy, x2 * sx, y2 * sy);
    line(x2 * sx, y2 * sy, x3 * sx, y3 * sy);
    line(x3 * sx, y3 * sy, x1 * sx, y1 * sy);

    getch();
    closegraph();
    return 0;
}

A modern, library-independent version

The same logic works in any language. This Python function scales a list of points about a chosen fixed point and has no dependency on a drawing library, so the result can be passed to whatever renders the shape.

def scale_points(points, sx, sy, fx=0.0, fy=0.0):
    """Scale (x, y) points about the fixed point (fx, fy)."""
    return [(fx + (x - fx) * sx, fy + (y - fy) * sy) for x, y in points]


triangle = [(100, 150), (200, 150), (150, 100)]

# Uniform scaling about the triangle's centroid keeps it in place
cx = sum(x for x, _ in triangle) / len(triangle)
cy = sum(y for _, y in triangle) / len(triangle)
larger = scale_points(triangle, 1.5, 1.5, cx, cy)

In practice, most graphics APIs and formats provide scaling directly. SVG has a scale() transform, the HTML canvas API has a scale() method, and design applications apply the same mathematics when a selection is resized. Writing the program by hand is mainly useful for learning how those built-in tools behave.

How this applies to vector logo files

Understanding the transformation explains several practical behaviors when a logo is resized:

  • Proportional scaling is uniform scaling. Locking the aspect ratio in a design tool forces Sx and Sy to stay equal, which prevents stretched or squashed letterforms.
  • Vector paths scale cleanly. Anchor points and curve control points are transformed mathematically, and the shape is rendered fresh at the new size, so edges stay crisp.
  • Embedded raster images do not gain detail. A bitmap placed inside a vector file is transformed as a block of pixels; enlarging it resamples existing pixels and can look soft or blocky.
  • Raster previews are not the artwork. Some vector formats carry a low-resolution preview image for thumbnails; scaling that preview says nothing about the quality of the underlying paths.
  • Stroke widths may or may not scale. Depending on settings, a stroke can scale with the shape or keep a fixed width. Design applications typically offer an option controlling this, and SVG supports a non-scaling stroke setting. Thin strokes that stay fixed while the shape shrinks can look heavier than intended at small sizes.
  • Scaling point matters for layout. Resizing about the center versus a corner changes where the logo ends up, which affects alignment in responsive layouts.

A file extension alone does not confirm that a logo contains scalable paths. An SVG, EPS, PDF or AI file can contain only an embedded bitmap, or a mix of paths and images. Opening the file in a vector editor and inspecting its objects, for example in an outline or wireframe view, is the reliable way to check before relying on clean scaling.

Mathematical scalability also does not guarantee legibility. A logo can be reduced to any size without losing sharpness, yet fine details, tight letter spacing or thin lines may become unreadable at very small sizes. That is a design judgment rather than a property of the transformation, and it is why some brands supply simplified versions for small placements.

Evidence gaps

No subject-specific evidence was supplied for this article, such as a particular logo, file, tool version or measured result. The explanation above relies on general, verifiable principles of 2D geometric transformation and common vector file behavior. The coordinates and scale factors in the code samples are illustrative only, and anyone working with a specific logo file should confirm its actual contents and any applicable usage terms directly.