# Horizontal, vertical and diagonal straight line graphs

Categories: gcse graphs

In this section, we will look at some simple straight-line graphs and their equations.

Here is a video on this topic:

## Horizontal lines

This graph shows a horizontal straight line:

We have marked a few example points that are on the line:

- (-2, 3)
- (1, 3)
- (3, 3)

Each of these points has the same *y* value of 3, and if you look at the line it is clear that any point on the line will have a *y* value of 3. So the line has the equation:

The formula of a graph defines all the points that are on the line. In this case, any points that have *y* equal to 3 are on the line and all other points are not on the line.

This line goes through 3 on the y-axis.

A line that goes through *a* on the y-axis has the equation:

The position of the line depends on the value of *a*:

- When
*a*is greater than 0, the horizontal line is above the x-axis. - When
*a*is 0, the horizontal line is on the x-axis. - When
*a*is less than 0, the horizontal line is below the x-axis.

For example:

## Vertical lines

This graph shows a vertical straight line:

These are points marked on the line:

- (2, -3)
- (2, 1)
- (2, 3)

Each of these points has the same *x* value of 2, and any point on the line will have an *x* value of 2. The line has the equation:

This line goes through 2 on the x-axis. A line that goes through *a* on the x-axis has the equation:

The position of the line depends on the value of *a*:

- When
*a*is greater than 0, the vertical line is to the right of the y-axis. - When
*a*is 0, the vertical line is on the y-axis. - When
*a*is less than 0, the vertical line is to the left of the x-axis.

For example:

Remember that *y = a* defines all the points with the same *y* value, so is a horizontal line. *x = a* defines all the points with the same *x* value, so is a vertical line.

## Main diagonal lines

Here is the main positive-going diagonal line:

This line goes through the origin, in an upwards direction. Here are some of the points the line goes through:

- (-3, -3)
- (1, 1)
- (2, 2)

Every point the line goes through has a *y* value that is equal to the *x* value, so the equation is:

Here is the main negative-going diagonal line:

This line also goes through the origin, this time in a downward direction. Here are some of the points the line goes through:

- (-2, 2)
- (2, -2)
- (3, -3)

In this graph, every point has a *y* value that is equal to the negative of the *x* value, so the equation is:

## See also

## Join the GraphicMaths Newletter

Sign up using this form to receive an email when new content is added:

## Popular tags

adder adjacency matrix alu and gate angle area argand diagram binary maths cartesian equation chain rule chord circle cofactor combinations complex modulus complex polygon complex power complex root cosh cosine cosine rule cpu cube decagon demorgans law derivative determinant diagonal directrix dodecagon eigenvalue eigenvector ellipse equilateral triangle euler eulers formula exponent exponential exterior angle first principles flip-flop focus gabriels horn gradient graph hendecagon heptagon hexagon horizontal hyperbola hyperbolic function hyperbolic functions infinity integration by parts integration by substitution interior angle inverse hyperbolic function inverse matrix irrational irregular polygon isosceles trapezium isosceles triangle kite koch curve l system line integral locus maclaurin series major axis matrix matrix algebra mean minor axis nand gate newton raphson method nonagon nor gate normal normal distribution not gate octagon or gate parabola parallelogram parametric equation pentagon perimeter permutations polar coordinates polynomial power probability probability distribution product rule proof pythagoras proof quadrilateral radians radius rectangle regular polygon rhombus root sech set set-reset flip-flop sine sine rule sinh sloping lines solving equations solving triangles square standard curves standard deviation star polygon statistics straight line graphs surface of revolution symmetry tangent tanh transformation transformations trapezium triangle turtle graphics variance vertical volume of revolution xnor gate xor gate