Linear Algebrain Matrix Multiplication
Linear Algebrain Matrix Multiplication
net/publication/350314436
CITATIONS READS
0 25,131
4 authors, including:
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Nandhini Velusamy on 23 March 2021.
Abstract – In this paper, we will discuss how linear algebra is used in computer graphics worked under
matrix multiplication, and we will also look on to the basic concept regarding computer graphics. In a 3D
graphics, the process of transforming points and direction vectors from one co-ordinate space to another is
used by matrices. The present study is to discuss the concepts of linear algebra that are applied in computer
graphics.
Keywords: linear algebra, matrix multiplication.
I. INTRODUCTION
Linear algebra is the branch of mathematics concerning linear equations such as
a1x1 + a2x2 + ... + anxn = b and their representations through matrices and vector space. Linear algebra is
central to almost all areas of mathematics. For instance, linear algebra is fundamental in modern
presentations of geometry, including for defining basic objects such as lines, planes and rotations. Also,
functional analysis may be basically viewed as the application of linear algebra to spaces of functions.
Linear algebra is also used in most sciences and engineering areas, because it allows modelling many natural
phenomena, and efficiently computing with such models. For nonlinear systems, which cannot be modelled
with linear algebra, linear algebra is often used as a first-order approximation.
The matrix is used in computer graphics over a large area or number of industries. The matrices are the
major mathematical tool which will help to build and develop to manipulate a realistic animation from a
figure of polygon. At the earliest stage of video gaming industry to rely more on computer graphics. Hence,
the basic necessity to program 3D video game is done by the concept of matrix multiplication.
The motivation of this paper is to provide details about Linear Algebra and some application approach
towards in computer graphics, which is worked under matrix multiplication. The rest of the article are
organized to be Section II, contains preliminaries, Section III has an approach towards matrix in computer
graphics. In the last section, conclusions are given.
II. PRELIMINARIES
• Linear system:
A finite set of linear equations in a finite set of variables, for example: x1, x2,..., xn or x, y, z is called
system of linear equations, forms a fundamental part of linear algebra. Linear algebra through vector spaces
and matrices, many problems may be interpreted in terms of linear systems.
• Vectors:
A vector is simply an element of a vector space, period. It has a phenomenon which contains two
independent properties: magnitude and direction, such as: weight, force, magnetic field, acceleration, etc.
• Matrix:
A matrix is a collection of numbers arranged in a fixed number of rows and columns. Usually the numbers
are real.
𝑐1
Example: [𝑟1 𝑟2 𝑟3]-row matrix, [𝑐2]-column matrix
𝑐3
𝑎1 𝑎2 𝑎3
[𝑎4 𝑎5 𝑎6]
𝑎7 𝑎8 𝑎9
• Matrix equation:
A matrix equation is an equation of the form Ax=B, where A is an m×n matrix, B is a vector in R m and
x is a vector whose coefficients x1, x2..., xn are unknown. There are a wide variety of problems that come
up in computer graphics that require the numerical solution of matrix equations. Matrix formulations of
problems come up often enough in graphics that I rank this area very high on the list of topics to know.
A matrix is a rectangular arrangement of numbers into rows and columns. When we work with matrices,
we refer to real numbers as scalars. The term scalar multiplication refers to the product of a real number
and a matrix. In scalar multiplication, each entry in the matrix is multiplied by the given scalar.
• COMPUTER GRAPHICS:
Computer graphics is the disciple of generating images with the aid of computers. Today, computer
graphics is a core technology in digital photography, film, video games, cell phone and many specialized
applications. Computer graphics can be a series of image or a single image. It is often abbreviated as CG,
or typically in the context of film as CGI.
• TYPES IN CG:
There are two kinds of computer graphics:
1) RASTER (composed of pixels)
2) VECTOR (composed of paths)
1) RASTER GRAPHICS:
Raster images are more commonly called bitmap images. A bitmap image uses a grid of individual pixels
where each pixel can be different colour or shade. Bitmaps are composed of pixels. In computer graphics
or bitmap images is a dot matrix data structure that represents a generally rectangular grid of pixels (points
of colour), viewable via a monitor, paper, or other display medium. Raster images are stored in image files
with varying formats. A raster is technically characterized by the width and height of the image in pixels
and by the number of bits per pixel.
2) VECTOR GRAPHICS:
Vector graphics are computer graphics images that are defined in terms of 2D points, which are connected
by lines and curves to form polygons and other shapes. Each of these points has a definite position on the
x-axis and y-axis of the work plane and determines the direction of the path. Vector graphics are commonly
found today in the SVG, EPS, PDF or AI graphic file formats and intrinsically different from the more
common raster graphics file formats such JPEG, PNG, APNG, and GIF.
SCALING:
2 0
If the picture is to be zoomed twice of its original size then the transformation matrix[ ] is multiplied
0 2
with the corresponding taken points of the image.
2. TRANSLATION:
Translation is a movement of objects without deformation. Every position or point is translated by the
same amount. For translating polygon, each vertex of the polygon is converted to a new position. Similarly,
curved objects are translated. To change the position of the circle or ellipse.Its centre coordinates are
transformed.
3. ROTATION:
It is a process of changing the angle of the object. Rotation can be clockwise or anticlockwise. For
rotation, we have to specify the angle of rotation and rotation point. Rotation point is also called a pivot
point. It is print about which object is rotated.
TYPES OF ROTATION:
1) Anticlockwise rotation
2) Clockwise rotation
The positive value of the pivot point (rotation angle) rotates an object in a counter - clockwise (anti-
clockwise) direction. The negative value of the pivot point (rotation angle) rotates an object in a clockwise
direction. When the object is rotated, then every point of the object is rotated by the same angle. Rotations
can also be done in straight lines, polygon, curved lines, circle and ellipse.
4. REFLECTION:
It is a transformation which produces a mirror image of an object. The mirror image can be either about
x-axis or y-axis.
TYPES OF REFLECTION:
1. Reflection about the x-axis
2. Reflection about the y-axis
3. Reflection about an axis perpendicular to x-y plane and passing through the origin
4. Reflection about line y=x
5. SHEARING:
It is transformation which changes the shape of object. The sliding of layers of object occur.
The shear can be in one direction or in two directions.
Shearing in the X-direction:
Shearing in the Y-direction:
Shearing in X-Y directions:
6. DILATION:
Dilation is usually represented by is one of the basic operations in mathematical Morphology.
The structuring element is moved across every pixel in the original image to give a pixel in a new
processed image during morphology.
PROBLEM 1:
ALTER THE SIZE OF THE GIVEN IMAGE BY USING SCALING PROCESS
SCALING:
2 0
If the picture is to be zoomed twice of its original size then the transformation matrix[ ] is multiplied
0 2
with the corresponding taken points of the image.
Solution:
Here we have taken the points of the house as the required matrix now it is to be zoomed
3 5
1 3
Twice, 4 3
1 1
[4 1]
IMAGE AFTER SCALING:
3 5 6 10
1 3 2 0 2 6
4 3 [0 2
] = 8 6
1 1 2 2
[4 1] [ 8 2 ]
Interpretation:
In a graph, the points of the image after scaling from its original position and so the required image are
formed.
Problem 2:
ROTATE THE GIVEN HOUSE INTO 900 FROM ITS ORIGINAL POSITION.
Solution:
3 5
1 3
4 3
1 1
[4 1]
IMAGE AFTER ROTATION THROUGH 900
3 5 −5 3
1 3 0 1 −3 1
4 3 [ −1 0 ] = −3 4
1 1 −1 1
[4 1 ] [ −1 4]
Interpretation:
In a graph, the points of the image after a rotation through 90o from its original position and so this lies in
the second quadrant.
Solution:
3 5
1 3
4 3
1 1
[4 1]
IMAGE AFTER ROTATION THROUGH 1800:
3 5 −3 −5
1 3 −1 0 −1 −3
4 3 [ ] = −4 −3
0 −1
1 1 −1 −1
[4 1] [ −4 −1]
Interpretation:
In a graph, the points of the image after a rotation through 180o from its original position and so this lies
in the third quadrant.
Problem 4:
ROTATE THE GIVEN POINTS OF AN IMAGE INTO 2700 FROM ITS ORIGINAL POSITION
Solution:
3 5
1 3
4 3
1 1
[4 1]
IMAGE AFTER ROTATION THROUGH 2700:
3 5 5 −3
1 3 0 −1 3 −1
4 3 [1 0
]= 3 −4
1 1 1 −1
[4 1] [1 −4 ]
Interpretation:
In a graph, the points of the image after a rotation through 270o from its original position and so this lies
in the fourth quadrant.
Problem 5:
ROTATE THE GIVEN POINTS OF AN IMAGE INTO 3600 FROM ITS ORIGINAL POSITION.
Solution:
3 5
1 3
4 3
1 1
[4 1]
IMAGE AFTER ROTATION THROUGH 3600:
3 5 3 5
1 3 1 0 1 3
4 3 [0 1
]= 4 3
1 1 1 1
[4 1] [4 1]
Interpretation:
In a graph, the points of the image after a rotation through 360o from its original position and so this lies
in the first quadrant.
REFLECTION:
1 0
To view the reflection of the taken image it should be multiplied with the transform matrix[ ].
0 −1
Problem 6:
REFLECT THE IMAGE OF A GIVEN POINTS FROM ITS ORIGINAL POSITION.
Solution:
3 5
1 3
4 3
1 1
[4 1]
IMAGE AFTER REFLECTION
3 5 3 −5
1 3 1 0 1 −3
4 3 [0 −1
]= 4 −3
1 1 1 −1
[4 1] [4 −1]
Interpretation:
In a graph, the points of the image for the reflected position lie in the fourth quadrant.
IV. CONCLUSION
In this project, I have given details about Linear algebra and some applications of Linear algebra. An
approach of Linear algebra in Computer graphics is presented. Mainstream Applications of computer
graphics can be seen in every type of media including animation, movies and videogames. In computer
graphics, how matrix is used as an ability to transform geometric data into different coordinate systems. In
easy terms, we say that the elements of a matrix that undergoes a transformation. So we try to understand
how images are being scaled, translated and rotated on the computer screen using a matrix transformation.
Finally, we concluded that many of the computer graphics applications are worked under matrix
multiplication in Linear algebra.
REFERENCES:
[1] Introduction to Linear Algebra -Fifth edition-Gilbert Strang
[2] Matrix and linear algebra in computer graphics-Kanti Bhushan Datta
[3] https://sites.math.washington.edu/~king/coursedir/m308a01/Projects/m308a01-pdf/yip.pdf
[4] Atkinson K.E ,An Introduction on Linear Algebra in Computer Graphics, Third Edition, Prentice hall
India, New Delhi, 1988.
[5] W. Moore, "Linear Algebra for Graphics Programming", Metal by Example, 2014. [Online]. Available:
https://metalbyexample.com/linear-algebra/.