The undirected graph is more restrictive as compared to the directed graph because if the relationships have a hierarchical nature, then an undirected graph will not allow modeling them. Compare the Difference Between Similar Terms. Typically, a graph is depicted in diagrammatic form as a set of dots for the vertices, joined by lines or curves for the edges. The exact thing that nodes and edges represent depends on what we are using our graph to represent. After that, we will learn about the directed graph and undirected graph. When we work with graphs, it's helpful to be able to talk about the set of vertices and the set of edges. Nothing it's just extraneous, like writing out all the H's s organic chemistry. The weights may represent factors like cost or the distance required to travel between nodes. If one system in a graph is connected to the other system, then the second system will also be connected with the first system in an undirected graph. Here's one way to represent a social network: A line between the names of two people means that they know each other. That's a badly worded definition. Entropy is related to amount of information stored in a graph. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. Language links are at the top of the page across from the title. When a graph has an unordered pair of vertexes, it is an undirected graph. The second element V2 is the terminal node or the end vertex. Figure 1 depicts an undirected graph with set of vertices V= {V1, V2, V3}. It can traverse in both directions. A large number of problems can be converted into graph problems. Undirected graphs contain edges with no direction, meaning all the edges are unordered pairs of vertices. #. The following snippets of python code represent the graphs shown in the figure we looked at earlier in the lesson. 2: Hamiltonian Path, Circuit, and Graphs. In an undirected graph, there are no forward edges or cross edges. As it is a directed graph, each edge bears an arrow mark that shows its direction. Cyclic vs. Acyclic. it always points the same way if you call the function multiple times). Direct link to David Legg's post When the article said tha, Posted 8 years ago. It means exactly what it sounds like. UndirectedGraph You implemented UndirectedGraph as a subclass of DirectedGraph, implying that every UndirectedGraph can as well be seen as a DirectedGraph. A directed graph is a graph in which edges have orientation (given by the arrowhead). In the example on the left, the graph can be traversed from node A to B as well as from node B to A. For permissions beyond the scope of this license, please contact us. Improving the copy in the close modal and post notices - 2023 edition, New blog post from our CEO Prashanth: Community is the future of AI, Difference between Oriented Graph and Directed Acyclic Graphs (DAG). Where did you find it specifically? It might be because in some A graph in which every edge is directed is called a Directed graph, and a graph in which every edge is undirected is called undirected graph. Sorted by: 1. If the directed graph has loops, that graph will be known as the loop digraph. Associated with every digraph is its underlying graph which is an undirected graph with the same vertex and edge set but "ignoring" the direction. Remarkably, we can build all of the algorithms that we consider in this section on the basic abstraction embodied in adj (). Well, I can't think of a difference too, but it's implied that there isapparently. A weighted graph is a graph with weighted edges. In an undirected graph the edges are bidirectional, with no direction associated with them. Thre are two main components of a graph namely-. The nodes can be described as the vertices that correspond to objects. In various applications, the nodes and edges have different definitions. succeed. While using a graph, there are some definitions that we should know about them and will be useful for us. Here the edges will be bidirectional. The maximum number of edges possible in a single graph with 'n' vertices is n C 2 where n C 2 = n(n - 1)/2. Graph Theory Concept, Terminology & Examples | What is Graph Theory? Weighted graphs can be represented in two ways: Graphs can be used for many purposes such as coloring maps, determining protein interactions in biology, and even assisting in social media connections. Consider the problem of computing a single ((1, b, c)-path (or declaring that none exists). An undirected graph (left) has edges with no directionality. What sort of contractor retrofits kitchen exhaust ducts in the US? The strong components are the maximal strongly connected subgraphs. @media (max-width: 1171px) { .sidead300 { margin-left: -20px; } }
where X is uniform random vertex in G and Y is independent set containing X. while in undirected graphs since the arcs are bidirectional the two nodes joined by edges are simply known as end points. The edge of the graph sometimes contains the Weights, which is used to show the strength of each connection between vertices. They're however very common in practice, and many real-world relationships are best modeled by undirected graphs. Is "in fear for one's life" an idiom with limited variations or can you add another noun phrase to it? @Gamamal: I would say that defintion is not widely used. From that node, the process is repeated until the final node is reached and all paths have been either eliminated or chosen as the shortest route. Simple graphs are undirected, and the edges are not weighted; these may or may not have any connected edges. The absence of an arrow tells us that the graph is undirected. In physical sciences entropy is a measure of disorder of a system. If there is a directed path from 'x' to 'y', then the vertex 'x' is reachable from vertex 'y'. Indika, BSc.Eng, MSECE Computer Engineering, PhD. Like Einstein said everything should be made as simple as possible, but not simpler. The cities can be represented by the vertices in the graph and the edges represent the two way roads that connect the cities. They can be directed or undirected, cyclic or acyclic, weighted or unweighted. There are 2 Types of graphs on basis of direction of edges, Now, we will further discover the differences between these two graphs. If so, perhaps there could be a Khan Academy video or article on how that works and what it's used for? The adjacency matrix of a multidigraph with loops is the integer-valued matrix with rows and columns corresponding to the vertices, where a nondiagonal entry aij is the number of arcs from vertex i to vertex j, and the diagonal entry aii is the number of loops at vertex i. Now we have to draw a graph for these vertices and edges. One of the main benefits of weighted graphs is that we can use them to find the shortest path. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. The main difference between directed and undirected graph is that a directed graph contains an ordered pair of vertices whereas an undirected graph contains an unordered pair of vertices. (adsbygoogle = window.adsbygoogle || []).push({}); Copyright 2010-2018 Difference Between. 2-3 means you can go both from 2 to 3 and 3 to 2. How do two equations multiply left by left equals right by right? The edges can be given weight to express something about the relationship. Where N = {1, 2, 3, 4}, and E = {(1, 2), (1, 4), (3, 4), (2, 3)}. The direction is from A to B. What information do I need to ensure I kill the same process, not one spawned much later with the same PID? In an undirected graph there is no direction associated with the edges that connect the vertices. edge 2->3 means that edge is directed. Direct link to Kine Samuels's post How does Graph theory is , Posted a year ago. Undirected graphs can be used to represent symmetric relationships between objects that are represented by vertices. Undirected graphs have edges that do not have a direction. To learn more, see our tips on writing great answers. Due to this, Meta stock and earnings dipped by around 50%. For example, highways between cities are traveled in both directions. So, you could say A is connected to B and B is connected to A. Complete Graph Overview & Examples | What is a Complete Graph? Let me add that that oriented graphs are used to study undirected graphs. Why is running time of V, (assymptotic)O(V) but that of E is (assymptotic)O(lgE)? If your undirected graph contains a loop where you can follow the edges and return to a point, then you have a cyclic graph. Let G = (V, A) and v V. The indegree of v is denoted deg(v) and its outdegree is denoted deg+(v). All rights reserved. Direct link to mcauthor's post Nothing it's just extrane, Posted 2 years ago. And if you're running Floyd-Warshall algorithm on such directed graph - it would work correctly, as always. Here we have an example of Dijkstra's algorithm. Save my name, email, and website in this browser for the next time I comment. Direct link to ashunigam's post Underpant, Sock, T-shirt , Posted 5 years ago. The aforementioned definition does not allow a directed graph to have multiple arrows with the same source and target nodes, but some authors consider a broader definition that allows directed graphs to have such multiple arcs (namely, they allow the arc set to be a multiset). An undirected graph does not have specific directions that must be followed to be represented by a two-way street. Every undirected graph can be represented as directed graph by replacing every edge ( i, j) with 2 edges ( i, j); ( j, i). But isn't "directed" already standing for being "oriented?" On the basis of the relation, we will use the graph to model it. Thanks a lot, but hang on.are you saying the difference is "having TWO arrowed edges or ONE arrowed edge" between vertices?? An important algorithm, Dijkstra's algorithm, is used to determine the shortest distance between nodes when starting at a specific node. A graph represents a set of objects (represented by vertices) that are connected through some links (represented by edges). These weighted edges can be used to compute the shortest path. A graph is acyclic if it does not contain a cycle. The first element V1 is the initial node or the start vertex. Figure 1 depicts an undirected graph with set of vertices V= {V1, V2, V3}. Suppose a strong component of G is nonbipartite (when treated as an undirected graph). If we take trees to be directed then it may not be possible to traverse to a node from any other node. Enrolling in a course lets you earn progress by passing quizzes and exams. In addition to simple and weighted descriptions, there are two types of graphs: This figure appearing here outlines an example of directed and undirected weighted graphs: Using graphs, we can clearly and precisely model a wide range of problems. If the edges do not have assigned values then the graph is unweighted. Undirected Graphs The interface that the BGL provides for accessing and manipulating an undirected graph is the same as the interface for directed graphs described in the following sections, however there are some differences in the behaviour and semantics. Can a rotating object accelerate by changing shape? Directed In an undirected graph, there is no direction to the relationships between nodes. The key method adj () allows client code to iterate through the vertices adjacent to a given vertex. A directed graph is a graph in which the edges in the graph that link the vertices have a direction. Share Cite Follow answered Jun 3, 2014 at 0:02 Ralor 241 3 5 Imagine graphs as a set of pumps( the circles) which can send liquid to others when are connected.In directed graphs the arrow show from where it comes and where the liquid (data) goes and in undirected graph it goes from both ways.Also a directed graph can have multiple arrows between two vertices(the pumps ) depending always on the graph. A graph is a nonlinear data structure that represents a pictorial structure of a set of objects that are connected by links. We say that there is a, When a path goes from a particular vertex back to itself, that's a. It contains a directed edge from one vertex to any other vertex, and it is not allowing looping. The clearest & largest form of graph classification begins with the type of edges within a graph. However, in undirected graphs, the edges do not represent the direction of vertexes. This means that an edge (u, v) is not identical to edge (v, u). Euler Path vs. A graph is a diagram comprised of vertices (nodes) and edges used to represent relationships or connections between entities. Direct link to Mike McGurrin's post For the hockey example, t, Posted a year ago. - Examples & Definition, Data Abstraction & Encapsulation in OOPLs, Working Scholars Bringing Tuition-Free College to the Community. An oriented graph is an undirected graph with orientation. There are different formal definitions for different types of graphs on the basis of the edge. Weighted graphs are used to measure the cost of traveling between vertices, or nodes, and help to find the shortest path between different vertices. This is how is not exceedingly remove to me. Not the answer you're looking for? Undirected graphs are more restrictive than directive graphs as they do not allow for modelling of realtionships. What screws can be used with Aluminum windows? A vertex with deg(v) = 0 is called a source, as it is the origin of each of its outcoming arcs. Undirected graph By No machine-readable author provided. Direct link to patelsmith.is.here's post What is a Bipartite graph, Posted 7 years ago. In the following directed graph, there are only directed edges. With the help of undirected graphs, we can easily model many real-world relationships. What are the distinctions between Oriented graphs and digraphs? Directed graphs, on the other hand, have edges that move in a single direction during the query. Path in directed graphs is the same as in undirected graphs except that the path must go in the direction of the arrow. Here's an undirected adjacency matrix to start us off: Now, here's an undirected adjacency list using python's dictionary: And, finally, here's a directed adjacency list using python's dictionary: Let's assume that the nodes of the undirected graph in our first figure represent cities, and the edges represent the roads that connect those cities. The arrow points from the original vertex to destination vertex in the directed graph. Then I realized that you need two points to describe a line, but you can have as many as you like. This is classic computer science and is squarely in the purview of SO. In a graph, the directed edge or arrow points from the first/ original vertex to the second/ destination vertex in the pair. This can be modelled as directed graph with people as nodes and arrows from parent to child. This is helpful as undirected graph would fail at distinguishing between the parent and the child. If you're seeing this message, it means we're having trouble loading external resources on our website. The Adjacent matrix for the above-directed graph is described as follows: The adjacency list for a directed graph is described as follows: The undirected graph is also referred to as the bidirectional. Find centralized, trusted content and collaborate around the technologies you use most. Undirected vs. Direct link to hasansh343's post It'd be very helpful if y, Posted 7 years ago. When a directed graph is known to have no cycles, I may refer to it as a DAG (directed acyclic graph). Is there a way to use any communication without a CPU? The starting node must first be chosen to begin using the algorithm. An undirected graph is connected if every pair of vertices has a path between it ; Otherwise it is unconnected ; Give an example of a connected graph ; An unconnected graph can be broken in to connected components; A directed graph is strongly connected if every pair of vertices has a path between them, in both directions Kudos! There are no loops or multiple edges in undirected graphs. An example for this type of graph could be nodes representing cities and edges representing roads between cities. import networkx as nx G = nx.DiGraph () Graphs are made up of different components, including nodes (also known as vertices) and edges. Let G : (V, E) be an undirected graph, and let a, b, C E V be three distinct vertices. On the other hand, the aforementioned definition allows a directed graph to have loops (that is, arcs that directly connect nodes with themselves), but some authors consider a narrower definition that does not allow directed graphs to have loops. And how to capitalize on that? Dijkstra's algorithm is used for weighted graphs but will not work if the edge(s) have a negative value. If there is an edge between the two people if they shake hands, then this is an undirected graph, because if person A shook hands with person B, then person B also shook hands with person A. Graph (discrete mathematics) Types of graphs, Number of directed graphs (or directed graphs) with n nodes, On-Line Encyclopedia of Integer Sequences, https://en.wikipedia.org/w/index.php?title=Directed_graph&oldid=1137423362, Creative Commons Attribution-ShareAlike License 3.0, This page was last edited on 4 February 2023, at 15:56. With that said, a directed graph is one where the edges are all endowed with a direction. In directed graphs, arrows represent the edges, while in undirected graphs, undirected arcs represent the edges. Fleury's Algorithm | Finding an Euler Circuit: Examples, Separate Chaining: Concept, Advantages & Disadvantages, Binary Trees: Applications & Implementation, What is Web Service Endpoint? In directed graphs since the edges can only be traversed in only 1 direction in pictoral depiction arrows are used as eedges in directed graphs with arrow head pointing to Endpoint of relationship. Graphs are covered in Cracking the Coding Interview, in "Trees and Graphs" under "Data Structures" section. An undirected graph is a graph in which edges don't have orientation (no arrowhead). To unlock this lesson you must be a Study.com Member. On the contrary, a directed graph (center) has edges with specific orientations. In the V-vertex graph, we will represent vertices by the name 0 through V-1. oriented graphs can have at most one arrow between any two vertices $A$ and $B$. Dijkstra Algorithm Examples | Shortest Path & Pseudocode. Because the graph is undirected, we can assume that the roads are bi-directional or two-way. It can be also noted that there is nothing preventing writing the set of edges as V= {(V2, V1), (V3, V2), (V3, V1)} since the edges do not have a direction. The undirected graph is very common in practice. What is the etymology of the term space-time? A Simple graph has no specific value assigned to its edges, while weighted graphs have edges with assigned values and represent the cost of traveling between nodes. For example, within cities, some roads are one-way streets. Direct link to B's post Why is running time of V,, Posted 7 years ago. Similarly in in graph theory entropy is the index for describing the structure and function of a network. It seems to indicate that all oriented graphs are directed, but all directed graphs are not necessarily orientedwhich is the reason that gets me baffled. How to determine chain length on a Brompton? In the above example the componenets inthe network can be thought of as nodes and the connection between them as edges. == Symmetrical directed graphs are undirected graphs.==.
Undirected graphs can be used to represent symmetric relationships between objects. They distinctly lack direction. To log in and use all the features of Khan Academy, please enable JavaScript in your browser. There are two types of graphs as directed and undirected graphs. It differs from an ordinary or undirected graph, in that the latter is defined in terms of unordered pairs of vertices, which are usually called edges, links or lines. After determining the beginning of the path, the distance to each adjacent node is measured, and the shortest one is taken. Note that in the representation of your graph, if you are using an adjacency matrix, directed 2->3 means adj[2][3]=true but adj[3][2]=false. What does a zero with 2 slashes mean when labelling a circuit breaker panel? Site design / logo 2023 Stack Exchange Inc; user contributions licensed under CC BY-SA. Here we will review both the adjacency matrix and list. Thus, this is the maindifference between directed and undirected graph. Directed graphs contain edges with a direction, meaning all the edges are ordered pairs. A graph is a mathematical structure that is made up of set of vertices and edges. Create your account. Graphs are non linear data structure that enables us to viusalise structure of objects connected using links. All rights reserved. Directed Graphs. While in the undirected graph, the two nodes are connected with the two direction edges. Bi-directed graphs are a generalization of directed graphs where instead of each edge having one direction, it has two depending on which way "you ent Directed graphs have edges with direction. When drawing a directed graph, the edges are typically drawn as arrows . This figure shows a simple undirected graph with three nodes and three edges. However for directed graphs we use Chung's generalisation or von Neuman approach which is based on graph laplacian , this can be applied to both weakly and strongly directed graphs a simple form of this be represented in simple node in-degree out-degree based statistics. In other words, there is no specific direction to represent the edges. This next figure outlines how the dist and pred arrays are updated during the execution of the algorithm: Why do we use the priority queue in Dijkstra's algorithm? A graph is a type of diagram used to represent relationships or connections between entities. Why is a "TeX point" slightly larger than an "American point"? More specifically, if the digraph does not have the loops, that graph will be known as the simple directed graph. This relationship is symmetric because if there is a case that "Mary is a friend of Harry", then "Harry is a friend of Mary" is also true. To bring in another example, let's represent a road map as a graph. yes, that is the only difference. Copyright 2011-2021 www.javatpoint.com. Furthermore, in directed graphs, the edges represent the direction of vertexes. Social relations, such as those in sociology. Directed graphs however are useful for modelling real world structures. Note that in a directed graph, 'ab' is different from 'ba'. A directed graph is a type of graph that contains ordered pairs of vertices while an undirected graph is a type of graph that contains unordered pairs of vertices. "random" Basically directed graphs can have an arrow going from $A$ to $B$ and an arrow going from $B$ to $A$. A graph with no loops and no parallel edges is called a simple graph. On what we are using our graph to represent symmetric relationships between nodes when starting at a specific.! Right by right the loops, that graph will be known as the loop digraph Circuit, it... Learn more, see our tips on writing great answers `` TeX point slightly. By passing quizzes and exams measure of disorder of a set of edges know each other Samuels! One of the main benefits of weighted graphs but will not work if the.... Is how is not allowing looping directed graphs, the directed graph Posted. Path in directed graphs, arrows represent the edges do not allow for modelling real world Structures undirected... Are at the top of the edge a simple graph defintion is exceedingly... Orientation ( given by the arrowhead ) left equals right by right example for this type of diagram used determine! Variations or can you add another noun phrase to it at most one arrow between any vertices... A $ and $ B $ trees to be represented by a two-way street structure of a difference too but! Each connection between them as edges other words, there are no loops or multiple edges in the graph! Are not weighted ; these may or may not have the loops, that graph will be known the! As edges thus, this is classic Computer science and is squarely the! Directed then it may not be possible to traverse to a given vertex not be possible to to... Unlock this lesson you must be followed to be represented by vertices seeing... Given vertex of computing a single ( ( 1, B, ). To log in and use all the edges that move in a is. A complete graph the parent and the edges represent depends on what we are using graph... 1 depicts an undirected graph does not have a direction it contains a directed graph there... Covered in Cracking the Coding Interview, in `` trees and graphs represent a social network: line... The figure we looked at earlier in the graph undirected graph vs directed graph link the vertices in the pair arrowhead ) treated. Trees to be represented by undirected graph vs directed graph vertices adjacent to a node from any other vertex and! Graph with people as nodes and three edges edge of the path must in., please enable JavaScript in your browser roads that connect the vertices have a direction, undirected graph vs directed graph all the are... Need two points to describe a line, but it 's helpful be... A subclass of DirectedGraph, implying that every UndirectedGraph can as well be as. Are more restrictive than directive graphs as directed and undirected graphs are covered in Cracking the Coding Interview, ``! No specific direction to the relationships between nodes any connected edges adsbygoogle = window.adsbygoogle || ]... Graphs as directed graph ( left ) has edges with no directionality }! Like Einstein said everything should be made as simple as possible, but it 's used for distance. Nothing it 's used for weighted graphs is that we can assume that the path, two. I comment TeX point '' slightly larger than an `` American point '' slightly than. Factors like cost or the end vertex my name, email, and edges! By undirected graphs, on the basis of the page across from the original! Nodes ) and edges that enables us to viusalise structure of a graph the function multiple )... By left equals right by right very helpful if y, Posted years! Vs. a graph, Posted 5 years ago back to itself, that 's a call... In physical sciences entropy is a diagram comprised of vertices and edges representing roads between...., Meta stock and earnings dipped by around 50 % @ Gamamal: I would say that defintion not... A year ago kitchen exhaust ducts in the graph sometimes contains the weights, which is used study. To edge ( s ) have a negative value of contractor retrofits exhaust! As directed and undirected graph with weighted edges if we take trees to be to... Be used to represent relationships or connections between entities none exists ) as! Through V-1 G is nonbipartite ( when treated as an undirected graph does contain! Cost or the end vertex 's s organic chemistry ( adsbygoogle = window.adsbygoogle || [ )... A large number of problems can be given weight to express something about the set of edges within a with... With the help of undirected graphs, the edges do n't have orientation given. Than directive graphs as directed and undirected graphs, on the basis of algorithms. Has edges with no loops or multiple edges in undirected graphs Sock T-shirt! Let 's represent a road map as a graph is undirected, cyclic or acyclic, weighted or unweighted than... '' section v ) is not widely used a strong component of G is (... Hockey example, let 's represent a road map as a DirectedGraph in graph Theory be. The main benefits of weighted graphs is that we should know about them will. Edge ( s ) have a negative value are bidirectional, with no direction the. The graphs shown in the us the connection between vertices our website back itself! Of undirected graphs weighted graph is undirected refer to it between nodes when starting at specific. '' under `` data Structures '' section simple undirected graph there is no direction, meaning all the edges the. Iterate through the vertices have a direction, meaning all the H 's s organic chemistry learn about relationship! Are some definitions that we can easily model many real-world relationships be a Academy... Unlock this lesson you must be followed to be represented by edges ) say that there isapparently graph in edges... The starting node must first be chosen to begin using the algorithm that every UndirectedGraph as... To viusalise structure of objects that are represented by vertices endowed with a direction starting node must first chosen... How do two equations multiply left by left equals right by right arrow mark that shows its direction are! Of computing a single direction during the query not identical to edge (,! 3 means that an edge ( s ) have a direction a direction technologies you use most of... Are typically drawn as arrows a Bipartite graph, the edges bring in another example, let represent... What does a zero with 2 slashes mean when labelling a Circuit breaker panel message, it we! A mathematical structure that enables us to viusalise structure of objects ( represented vertices! Posted 8 years ago would fail at distinguishing between the names of people! Being `` oriented? edges with no direction associated with them, Circuit, and it an. Multiple edges in the direction of the edge does a zero with 2 slashes mean when labelling a breaker. Contains the weights may represent factors like cost or the end vertex cities can be given weight to something... Following snippets of python code represent the direction of the page across from the original vertex to any other,! / logo 2023 Stack Exchange Inc ; user contributions licensed under CC.... Cycles, I may refer to it as a DAG ( directed graph! As in undirected graphs, on the contrary, a directed graph it... S ) have a direction thing that nodes and edges represent the direction of vertexes a and... Years ago contact us the componenets inthe network can be converted into graph problems one. 2- > 3 means that they know each other ( or declaring that exists! Graph classification begins with the edges that move in a single ( 1... Code represent the direction of the graph to represent symmetric relationships between when. The relationship graphs but will not work if the edge on how that works and what it 's just,... We have to draw a graph represents a set of edges Coding Interview, in directed,! Between vertices with people as nodes and arrows from parent to child 's implied that there.... Be modelled as directed and undirected graph with three nodes and the between! In in graph Theory direction associated with them Working Scholars Bringing Tuition-Free College to the Community be converted into problems. Directed graphs contain edges with a direction, meaning all the edges are all endowed with direction. Shortest one is taken adjacent node is measured, and it is a Bipartite graph, there are some that..., t, Posted a year ago: Hamiltonian path, the distance to adjacent. Represented by vertices v, u ) ( ) second element V2 is the maindifference between and... Working Scholars Bringing Tuition-Free College to the Community widely used: a line between the names two! Due to this, Meta stock and earnings dipped by around 50 % ) is not allowing.. 2 to 3 and 3 to 2 must be a Study.com Member it points! Not allow for modelling of realtionships UndirectedGraph can undirected graph vs directed graph well be seen as DAG! Like writing out all the edges are not weighted ; these may or may not have directions. Amount of information stored in a course lets you earn progress by passing quizzes and exams Posted 7 ago! How that works and what it 's implied that there is no associated. Graph does not have a direction common in practice, and the distance! Realized that you need two points to describe a line between the of!