What is a polynomial?
A polynomial is a mathematical expression that contains more than two algebraic terms. It is a sum of several terms that contain different powers of the same variable. is the representation of a polynomial. A polynomial expression representation consists of at least one variable, and typically includes constants and positive constants as well. It is represented as , where is the variable, are the coefficients and is the degree of the polynomial. The coefficients must be a real number.
It is necessary for the polynomial expression that each expression consists of two parts:
- Coefficient part
- Exponent part
. Here, 21, 3, 14, and 21 are the coefficients, and 3,2,1 and 0 are the exponential values.
Types of polynomials
It has only one term, like 2x, 23xy.
It has two terms, or we can say that it is the sum of two monomials; for example, 2x+3.
It consists of three terms of monomials; for example, 2x+3y+7z.
Matrix representation of a polynomial
Consider a polynomial equation . It can be written as:
It can be written as . Here, , and .
But how do we find the value of . Furthermore, Here has degree 2. It is represented as the multiplication of matrix and vector,
Important Point- If , then
Then compare the coefficients of both sides of the equation to get .
Let us assume that .
From the first line, we note that:
, and hence that
It is a matrix representation of the polynomial.
Vector space of polynomials
The n degree polynomial is a function that is represented as:
, where is the coefficient of a real number, and n is degree.
Polynomials are represented by the vector of their coefficients in a vector space:
Representation of polynomial
There are various ways to represent the polynomials, two of which are given below.
- Using array
- Using a linked list
Representation of polynomial equation using array
The operations such as addition, subtraction, multiplication, differentiation and so forth can be performed on the polynomials represented as arrays.
Consider a polynomial with two variables: .
The array representation of the polynomial is give below:
Index 0 stores the coefficient of the first term, index 1 stores the exponent of the variable x and index 2 stores the exponent of the variable y in the first term. The process is repeated for the remaining terms in the polynomial.
It can also be represented as a 2-dimentional array as follows:
Representation of polynomial with single variable -
Consider a polynomial then we can write as:
For the one-dimensional array, store the coefficients in the index given by the coefficient of the polynomial.
In the array representation, the array first the first element stores the coefficient of the term with the lowest exponent and the last element contains the coefficient of the term with the highest exponent.
The above diagram shows the array representation of polynomial. A polynomial of a single variable can be written as where and degree of is n. Here is the coefficient of respective terms.
The polynomial is represented using an array of size n which has n+1 terms.
Polynomial Addition using Array
Consider two different polynomials and . The degree of is 3 and the degree of is 2. The steps to add the polynomials are listed below.
- First identify the highest degree polynomial. The degree of the resultant polynomial is same as the polynomial with the highest degree.
- Store the coefficient in the index specified by the exponents of the polynomial.
- Add the coefficients stored in one array with the corresponding index positions in the other array and store the result in the same index position in the resultant array.
Representation of polynomial using linked list
An ordered list of non-zero terms can be thought of as a polynomial. Each non-zero term consists of three sections namely coefficient part, exponent part, and then a pointer pointing to the node containing the next term of the polynomial.
Let's take an example-
If the polynomial is , then it is written in the form of and represented it using a linked list. In the diagram, AON means "address of next node".
The above diagram shows the linked list representation of polynomial. A polynomial of a single variable can be written as where and degree of is n. Here is the coefficient of respective terms.
Addition of polynomials represented as linked lists
Consider the polynomials and .
The addition of linked list is done by three cases-
If the exponent of the node pointed by j of is less than the exponent of the current node pointed by i of , then copy the value of current node of pointed by i in the new node. If the new node is the first node, make it pointed by and a pointer k. Otherwise, add the new node next to the last node.
If the exponent of the node pointed by j of is greater than the exponent of the current node pointed by i of , then copy the value of the current node pointed by j in the new node. If the new node is the first node, make it pointed by and a pointer k. Otherwise, add the new node next to the last node.
If the exponent of two terms of polynomials is equal, then the coefficients are added, and the new term is stored in the resultant polynomial and advance i, j and k to move to the next node.
There are some common mistakes made in the polynomial. When expanding a binomial raised to a power, students frequently make the error of "distributing the exponent," which is comparable to distributing a coefficient. Here's an illustration:
This is a wrong calculation. Remember that squaring a polynomial is the same as multiplying it by itself. If we perform the same thing with this binomial, we get the following:
The outcomes are not the same. Remember that the word "distribute" refers to multiplication, not exponents or powers. Note that we could have multiplied the two polynomials with FOIL as well. When factoring a sum or difference of squares, the same mistake is committed in reverse:
or ===> Incorrect
There is no factoring formula that uses the "sum of squares." There is, however, a factoring formula based on "difference of squares"; though, the output is not the same binomial squared:
When asked to simplify an expression within a radical, another common error is to spread the root. As an example,
Since we cannot factor .
We didn't write it as a square or some other equation, so the square root can't be calculated.
Context and Applications
This topic is very useful for under graduation and post graduation also. Especially for,
- Bachelor degree in Computer Science
- Bachelor degree in Electronics engineering
- Master in Computer science
- Polynomial representation in data structure
- Polynomial in one variable
- Coefficient of polynomial
Q1- The Exponent of polynomial must be-
- Non Negative
- Complex number
Correct answer: Non negative
Explanation- For an algebraic expression to be a polynomial, all of the exponents in it must be non-negative integers. If an algebraic expression contains a radical, it isn't a polynomial, as a general rule.
Q2- is a polynomial of-
- One variable
- Two variable
- Three variable
- Four variable
Correct Answer- One variable
Explanation- The expression contains only one variable x.
Q3- What is the way to represent a polynomial?
- Representation using Array
- Representation using linked list
Correct answer- Both
Explanation- There are 2 ways to represent a polynomial and they are array and linked list.
Q4- What is the example of trinomial?
Explanation- This expression contains 3 variables x, y and z.
Q5- Adding the polynomials require adding the ___________
- exponents of the corresponding terms
- coefficients of the corresponding terms
Correct answer- 2. coefficients of the corresponding terms
Explanation- The coefficient of the first polynomial is added with the coefficient of the corresponding term in the second polynomial to obtain the resultant polynomial.
Want more help with your computer science homework?
*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Representation of Polynomial Homework Questions from Fellow Students
Browse our recently answered Representation of Polynomial homework questions.